* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #2c5aa0 0%, #1a3a6b 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-brand {
    padding: 15px 0;
}

.nav-brand h1 {
    font-size: 1.5rem;
    margin-bottom: 3px;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 5px;
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 15px 25px;
    display: block;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    border-bottom-color: #ffd700;
    font-weight: 600;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 2rem;
    color: #2c5aa0;
    margin-bottom: 5px;
}

.page-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card h3 {
    color: #2c5aa0;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Section Cards (colored) */
.section-kg {
    border-left: 4px solid #0b4a77;
}

.section-kg h3 {
    color: #0b4a77;
}

.section-mm {
    border-left: 4px solid #8a5b00;
}

.section-mm h3 {
    color: #8a5b00;
}

.section-pbk {
    border-left: 4px solid #7a121b;
}

.section-pbk h3 {
    color: #7a121b;
}

/* People Categories */
.people-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.category-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.category-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.category-card h3 {
    color: #2c5aa0;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.category-card .count {
    font-size: 2rem;
    font-weight: 700;
    color: #666;
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

/* Assignment Rows */
.assignment-row {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 15px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.assignment-row label {
    font-weight: 600;
    color: #333;
}

.assignment-row select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

/* MM and PBK Rows */
.mm-row, .pbk-row {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 3px solid #8a5b00;
}

.pbk-row {
    border-left-color: #7a121b;
}

.row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.row-inputs {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.row-inputs input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.row-selects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.row-selects.single {
    grid-template-columns: 1fr;
}

.row-selects select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-primary:hover {
    background: #1a3a6b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 8px 15px;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* Toolbar Actions */
.toolbar-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table thead {
    background: #f8f9fa;
}

table th {
    text-align: left;
    padding: 12px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

table tr:hover {
    background: #f8f9fa;
}

/* Lists */
.cycle-item, .thursday-item, .person-item {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #2c5aa0;
}

.cycle-item:hover, .thursday-item:hover, .person-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.item-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.item-meta {
    color: #666;
    font-size: 0.95rem;
}

.item-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Utilities */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.text-muted {
    color: #6c757d;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-primary {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Print Styles */
@media print {
    .navbar,
    .toolbar-actions,
    .btn,
    .page-header button {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-wrap: wrap;
    }
    
    .nav-link {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .page-header h2 {
        font-size: 1.5rem;
    }
    
    .people-categories {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .assignment-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .row-selects {
        grid-template-columns: 1fr;
    }
    
    .toolbar-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Success/Error Messages */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
}
