/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0d7f44 5%, #1e3a8a 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header-content .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.header-content .logo i {
    font-size: 2rem;
    color: #0d7f44;
}

.header-content h1 {
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.header-content .subtitle {
    color: #718096;
    font-size: 1rem;
    margin: 0;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #0d7f44;
}

.breadcrumb .separator {
    color: #a0aec0;
}

.breadcrumb .current {
    color: #2d3748;
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Welcome Section */
.welcome-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.welcome-section h2 {
    color: #007b83;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.welcome-section p {
    color: #718096;
    font-size: 1rem;
}

/* Navigation Cards */
.nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.nav-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 20px;
    border-radius: 15px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0d7f44, #1e3a8a);
    transition: height 0.3s ease;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.nav-card:hover::before {
    height: 8px;
}

.card-icon {
    text-align: center;
    margin-bottom: 15px;
}

.card-icon i {
    font-size: 2.5rem;
    color: #1e3a8a;
    transition: color 0.3s ease;
}

.nav-card:hover .card-icon i {
    color: #0d7f44;
}

.nav-card h3 {
    color: #2d3748;
    font-size: 1.3rem;
    margin-bottom: 10px;
    text-align: center;
}

.nav-card p {
    color: #718096;
    text-align: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.card-arrow {
    text-align: center;
}

.card-arrow i {
    font-size: 1rem;
    color: #a0aec0;
    transition: all 0.3s ease;
}

.nav-card:hover .card-arrow i {
    color: #667eea;
    transform: translateX(5px);
}

/* Form Styles */
.form-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 15px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.form-header h2 {
    color: #2d3748;
    margin: 0;
    font-size: 1.5rem;
}

.login-info {
    background: #f7fafc;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.login-info p {
    margin: 2px 0;
    font-size: 0.8rem;
    color: #4a5568;
}

.current-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #007b83;
    font-weight: 600;
    background: #f7fafc;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.absensi-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.form-row.mobile-stack {
    grid-template-columns: 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: #2d3748;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.form-group label i {
    color: #667eea;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Status Summary */
.status-summary {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.summary-text {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
}

/* Siswa/Qori Status List */
.siswa-status-list, .qori-status-list {
    max-height: 350px;
    overflow-y: auto;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
}

.loading, .empty-message, .error-message {
    text-align: center;
    color: #718096;
    padding: 20px;
    font-style: italic;
    font-size: 0.9rem;
}

.error-message {
    color: #e53e3e;
}

/* Mobile Grid Classes */
.mobile-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mobile-grid-5 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mobile-span-2 {
    grid-column: span 2;
}

.mobile-full {
    grid-column: span 2;
    width: 100%;
}

.mobile-responsive {
    transition: all 0.3s ease;
}

.mobile-hide {
    display: inline;
}

.mobile-stack {
    flex-direction: column;
}

/* Bulk Actions */
.bulk-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.bulk-actions button {
    padding: 8px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
}

/* Status Item Styles */
.siswa-status-item, .qori-status-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
    transition: all 0.3s ease;
}

.siswa-status-item:hover, .qori-status-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.siswa-name, .qori-name {
    font-weight: 600;
    color: #2d3748;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
    font-size: 0.9rem;
}

.siswa-status-options, .qori-status-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    justify-content: center;
}

.siswa-status-radio, .qori-status-radio {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    font-size: 0.75rem;
    min-width: 50px;
}

.siswa-status-radio input[type="radio"], .qori-status-radio input[type="radio"] {
    display: none;
}

.siswa-status-radio.hadir, .qori-status-radio.hadir {
    color: #38a169;
    border-color: #c6f6d5;
}

.siswa-status-radio.izin, .qori-status-radio.izin {
    color: #3182ce;
    border-color: #bee3f8;
}

.siswa-status-radio.sakit, .qori-status-radio.sakit {
    color: #d69e2e;
    border-color: #faf089;
}

.siswa-status-radio.alfa, .qori-status-radio.alfa {
    color: #e53e3e;
    border-color: #fed7d7;
}

.qori-status-radio.tidak-ada-jadwal {
    color: #718096;
    border-color: #e2e8f0;
    grid-column: span 2;
}

.siswa-status-radio:has(input:checked).hadir, .qori-status-radio:has(input:checked).hadir {
    background: #c6f6d5;
    border-color: #38a169;
    font-weight: 700;
}

.siswa-status-radio:has(input:checked).izin, .qori-status-radio:has(input:checked).izin {
    background: #bee3f8;
    border-color: #3182ce;
    font-weight: 700;
}

.siswa-status-radio:has(input:checked).sakit, .qori-status-radio:has(input:checked).sakit {
    background: #faf089;
    border-color: #d69e2e;
    font-weight: 700;
}

.siswa-status-radio:has(input:checked).alfa, .qori-status-radio:has(input:checked).alfa {
    background: #fed7d7;
    border-color: #e53e3e;
    font-weight: 700;
}

.qori-status-radio:has(input:checked).tidak-ada-jadwal {
    background: #f7fafc;
    border-color: #718096;
    font-weight: 700;
}

.siswa-status-radio:hover, .qori-status-radio:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #0d7f44, #1e3a8a);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f7fafc;
    color: #2d3748;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
    transform: translateY(-2px);
}

.btn-success {
    background: #38a169;
    color: white;
}

.btn-success:hover {
    background: #2f855a;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid currentColor;
}

.btn-outline.btn-blue {
    color: #3182ce;
}

.btn-outline.btn-yellow {
    color: #d69e2e;
}

.btn-outline.btn-red {
    color: #e53e3e;
}

.btn-outline.btn-gray {
    color: #718096;
}

.btn-outline:hover {
    background: currentColor;
    color: white;
}

.btn-small {
    padding: 6px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 10px;
}

.form-actions.mobile-stack {
    flex-direction: column;
}

.form-actions.mobile-stack .btn {
    width: 100%;
}

/* Table Styles */
.data-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 15px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
}

.section-header h3 {
    color: #2d3748;
    margin: 0;
    font-size: 1.3rem;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.table-container.mobile-responsive {
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 600px;
}

.data-table thead {
    background: linear-gradient(135deg, #0d7f44, #1e3a8a);
}

.data-table thead th {
    padding: 12px 8px;
    text-align: left;
    color: white;
    font-weight: 600;
    border-bottom: none;
    font-size: 0.8rem;
}

.data-table tbody tr {
    background: #fff;
    transition: background-color 0.3s ease;
}

.data-table tbody tr:nth-child(even) {
    background: #f7fafc;
}

.data-table tbody tr:hover {
    background: #edf2f7;
}

.data-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    font-size: 0.8rem;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-hadir {
    background: #c6f6d5;
    color: #2f855a;
}

.status-izin {
    background: #bee3f8;
    color: #2b6cb0;
}

.status-sakit {
    background: #faf089;
    color: #b7791f;
}

.status-alfa {
    background: #fed7d7;
    color: #c53030;
}

.status-tidak-ada-jadwal {
    background: #f7fafc;
    color: #718096;
}

/* Statistics Section */
.stats-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 15px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stats-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-card {
    background: #f7fafc;
    padding: 20px 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    min-height: 80px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon i {
    font-size: 1.5rem;
    color: #0d7f44;
}

.stat-content h4 {
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.stat-content p {
    color: #718096;
    margin: 0;
    font-size: 0.8rem;
}

/* Admin Styles */
.admin-login-form {
    max-width: 350px;
    margin: 0 auto;
}

.admin-panel {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 15px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-sections {
    display: grid;
    gap: 20px;
}

.admin-section {
    background: #f7fafc;
    padding: 20px 15px;
    border-radius: 12px;
    border-left: 4px solid #0d7f44;
}

.admin-section h3 {
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.export-controls, .import-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-input {
    padding: 10px;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.file-input:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.import-info {
    background: #fef5e7;
    border: 1px solid #f6e05e;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #744210;
    font-size: 0.8rem;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.footer p {
    color: #0d7f44;
    margin: 0;
    font-size: 0.9rem;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.alert-success {
    background: #c6f6d5;
    color: #2f855a;
    border-left: 4px solid #38a169;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
    border-left: 4px solid #e53e3e;
}

.alert-info {
    background: #bee3f8;
    color: #2b6cb0;
    border-left: 4px solid #3182ce;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.truncate {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Hide Classes */
@media (max-width: 768px) {
    .container {
        padding: 8px;
    }
    
    .mobile-hide-1 {
        display: none;
    }
    
    .mobile-hide {
        display: none;
    }
    
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .form-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .current-date {
        justify-content: center;
    }
    
    .nav-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .nav-card {
        padding: 25px 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 15px 10px;
        min-height: 70px;
    }
    
    .bulk-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }
    
    .status-badge {
        padding: 2px 6px;
        font-size: 0.65rem;
    }
    
    .truncate {
        max-width: 80px;
    }
}

@media (max-width: 480px) {
    .mobile-hide-2 {
        display: none;
    }
    
    .header-content .logo {
        flex-direction: column;
        gap: 8px;
    }
    
    .header-content h1 {
        font-size: 1.3rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        min-width: 400px;
    }
}

@media (max-width: 360px) {
    .mobile-hide-3,
    .mobile-hide-4,
    .mobile-hide-5,
    .mobile-hide-6 {
        display: none;
    }
    
    .data-table {
        min-width: 300px;
        font-size: 0.7rem;
    }
    
    .siswa-status-options,
    .qori-status-options {
        grid-template-columns: 1fr;
    }
    
    .bulk-actions {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .header,
    .breadcrumb,
    .form-section,
    .footer {
        display: none;
    }
    
    .data-section {
        background: white;
        box-shadow: none;
    }
    
    .data-table {
        border: 1px solid #000;
    }
    
    .data-table th,
    .data-table td {
        border: 1px solid #000;
        padding: 6px;
    }
    
    .data-table thead {
        background: #f0f0f0 !important;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .alert {
        opacity: 0.9;
    }
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo img {
  height: 50px;
  width: auto;
}

.logo span {
  font-weight: 600;
  font-size: 18px;
  color: #333;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo img {
  height: 50px;
  width: auto;
}

.logo span {
  font-weight: 600;
  font-size: 18px;
  color: #333;
}

@media (max-width: 600px) {
  .logo {
    justify-content: center;
    flex-wrap: wrap;
  }
  .logo span {
    display: block;
    font-size: 16px;
  }
}