* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gray: #2c3e50;
    --secondary-gray: #34495e;
    --light-gray: #ecf0f1;
    --medium-gray: #95a5a6;
    --dark-gray: #1a1a1a;
    --border-gray: #d5d5d5;
    --hover-gray: #f5f5f5;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 50%, #b8b8b8 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-gray);
}

.container::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
}

.header-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 30px 40px;
    border-bottom: 3px solid #1a252f;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    gap: 25px;
    min-height: 140px;
}

.logo-container {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    background: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    height: fit-content;
}

.logo {
    height: 100px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.header-content {
    flex: 1;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.header-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.header-content h1 {
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 2.2em;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-content .subtitle {
    color: #bdc3c7;
    font-size: 0.95em;
    font-weight: 400;
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
}

.content-section {
    padding: 35px 40px;
    background: #fafafa;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid var(--border-gray);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 15px;
}

.header-actions h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.4em;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.stats-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 150px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-gray);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--medium-gray);
}

.stat-label {
    font-size: 0.75em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-primary);
}

.btn {
    padding: 11px 22px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: #ffffff;
    border: 1px solid #1a252f;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: #ffffff;
    border: 1px solid #1e8449;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #ffffff;
    border: 1px solid #d68910;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #ffffff;
    border: 1px solid #a93226;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
    color: #ffffff;
    border: 1px solid #5d6d7e;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.table-wrapper {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid var(--border-gray);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

thead {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: #ffffff;
    position: relative;
}

thead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #1a252f;
}

th {
    padding: 16px 18px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75em;
    letter-spacing: 1px;
    color: #ecf0f1;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

th:last-child {
    border-right: none;
}

th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    color: var(--text-primary);
    font-size: 0.9em;
    background: #ffffff;
    transition: background 0.2s ease;
}

tbody tr {
    transition: all 0.2s ease;
    position: relative;
}

tbody tr::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: #f8f9fa;
}

tbody tr:hover::before {
    background: #34495e;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:nth-child(even) {
    background: #fafafa;
}

tbody tr:nth-child(even):hover {
    background: #f0f0f0;
}

.actions {
    display: flex;
    gap: 8px;
}

.actions .btn {
    padding: 7px 14px;
    font-size: 12px;
    min-width: 80px;
    justify-content: center;
}

.form-container {
    max-width: 700px;
    margin: 0 auto;
    background: #ffffff;
    padding: 35px;
    border-radius: 8px;
    border: 1px solid var(--border-gray);
    box-shadow: var(--shadow-md);
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--light-gray);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85em;
}

.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-gray);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: var(--text-primary);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #34495e;
    box-shadow: 0 0 0 3px rgba(52, 73, 94, 0.1);
    background: #fafafa;
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--light-gray);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 2px dashed var(--border-gray);
}

.empty-state-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h2 {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1.3em;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.95em;
}

.alert {
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 0.9em;
    border-left: 4px solid;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert::before {
    font-size: 1.3em;
}

.alert-success {
    background: #d5f4e6;
    color: #155724;
    border-color: #27ae60;
}

.alert-success::before {
    content: '✓';
    color: #27ae60;
    font-weight: bold;
}

.alert-danger {
    background: #fadbd8;
    color: #721c24;
    border-color: #e74c3c;
}

.alert-danger::before {
    content: '✕';
    color: #e74c3c;
    font-weight: bold;
}

.alert-info {
    background: #d6eaf8;
    color: #0c5460;
    border-color: #3498db;
}

.alert-info::before {
    content: 'ℹ';
    color: #3498db;
    font-weight: bold;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-gray {
    background: #ecf0f1;
    color: #34495e;
}

.badge-primary {
    background: #34495e;
    color: #ffffff;
}

@media (max-width: 1024px) {
    .container {
        margin: 10px;
    }
    
    .content-section {
        padding: 25px 20px;
    }
    
    .header-section {
        padding: 25px 20px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 8px;
    }
    
    .header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
        min-height: auto;
    }
    
    .logo-container {
        padding: 10px 15px;
        align-self: center;
    }
    
    .logo {
        height: 70px;
    }
    
    .header-content {
        width: 100%;
        text-align: center;
    }
    
    .header-content h1 {
        font-size: 1.8em;
    }
    
    .table-wrapper {
        overflow-x: auto;
    }
    
    table {
        min-width: 800px;
        font-size: 13px;
    }
    
    th, td {
        padding: 12px 10px;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .actions .btn {
        width: 100%;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-bar {
        flex-direction: column;
    }
    
    .form-container {
        padding: 25px 20px;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #f0f0f0 4%, #e0e0e0 25%, #f0f0f0 36%);
    background-size: 1000px 100%;
}
