/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container and layout */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 3rem;
}

.nav-brand a {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    letter-spacing: -0.025em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    transition: color 0.2s ease;
    cursor: pointer;
}

.nav-links a:hover {
    color: #1a1a1a;
}

/* Page header */
.page-header {
    margin-bottom: 4rem;
    text-align: left;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    letter-spacing: -0.05em;
}

.subtitle {
    font-size: 1.125rem;
    color: #666;
    font-weight: 300;
    line-height: 1.5;
}

/* Content sections */
.content-section {
    margin-bottom: 4rem;
}

.content-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2rem;
    letter-spacing: -0.025em;
}

/* Years grid */
.years-grid {
    display: grid;
    gap: 1.5rem;
}

.year-item {
    padding: 1.5rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.year-item:hover {
    border-color: #d0d0d0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.year-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.year-item p {
    color: #666;
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1a1a1a;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn:hover {
    border-color: #d0d0d0;
    background: #f8f8f8;
}

.btn-primary {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.btn-primary:hover {
    background: #333;
    border-color: #333;
}

.btn-secondary {
    background: #ffffff;
    color: #666;
    border-color: #e5e5e5;
}

.btn-secondary:hover {
    background: #f8f8f8;
    color: #1a1a1a;
    border-color: #d0d0d0;
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 2rem;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.close {
    color: #999;
    float: right;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    margin-top: -0.5rem;
    margin-right: -0.5rem;
    padding: 0.5rem;
}

.close:hover,
.close:focus {
    color: #666;
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1a1a1a;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

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

/* Table styles */
.table-container {
    overflow-x: auto;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
    font-size: 0.875rem;
}

th {
    background-color: #f8f8f8;
    font-weight: 600;
    color: #1a1a1a;
    border-bottom: 1px solid #d0d0d0;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: #f8f8f8;
}

input[type="text"],
input[type="email"] {
    padding: 0.5rem;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: inherit;
}

.editable {
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.editable:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(102, 102, 102, 0.1);
}

/* Admin sections */
.admin-years-section,
.admin-users-section {
    margin-bottom: 3rem;
}

.admin-years-section h2,
.admin-users-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

#add-user-btn {
    margin-bottom: 1.5rem;
}

/* Legacy support for existing classes */
.years-section,
.actions-section {
    margin-bottom: 3rem;
}

.years-list {
    display: grid;
    gap: 1.5rem;
}

.actions-section {
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .page-header {
        margin-bottom: 2rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 1.5rem;
        width: 95%;
    }
    
    .years-grid,
    .years-list {
        gap: 1rem;
    }
    
    .year-item {
        padding: 1rem;
    }
    
    th,
    td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8125rem;
    }
}