/* Bright Professional Color Scheme */
:root {
    --primary-blue: #4F46E5;
    --primary-blue-light: #6366F1;
    --primary-blue-dark: #3730A3;
    --secondary-green: #10B981;
    --secondary-green-light: #34D399;
    --accent-orange: #F59E0B;
    --accent-red: #EF4444;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-tertiary: #F1F5F9;
    --text-primary: #1E293B;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --border-light: #E2E8F0;
    --border-medium: #CBD5E1;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
}

/* Basic user styles */
body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Logo Watermark - Added here for body element */
body::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background-image: url('logo.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.2;
    z-index: 1;
    pointer-events: none;
    user-select: none;
}

/* }
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.footer {
    margin-top: auto;
    text-align: center;
    padding: 25px;
    color: var(--text-muted);
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
} */
main {
    min-height: calc(100vh - 120px); /* Adjust based on header/footer height */
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
    padding: 30px;
    background: var(--bg-secondary);
    overflow-y: auto;
}
.topbar {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: white;
    padding: 16px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.login-box {
    width: 400px;
    margin: 60px auto;
    padding: 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.login-box input, .login-box select {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.login-box input:focus, .login-box select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

button {
    padding: 14px 28px;
    border: 0;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

button:hover {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.error {
    color: #DC2626;
    background: #FEF2F2;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid #FECACA;
    margin-bottom: 16px;
    font-weight: 500;
}

.success {
    background: #F0FDF4;
    color: #166534;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid #BBF7D0;
    margin-bottom: 16px;
    font-weight: 500;
}

/* Dashboard Layout */
.admin-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 80px);
    gap: 0;
    background: var(--bg-secondary);
}

.sidebar {
    background: var(--bg-primary);
    border-right: 1px solid var(--border-light);
    padding: 0;
    box-shadow: var(--shadow-sm);
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    border-bottom: 1px solid var(--bg-tertiary);
}

.sidebar ul li a {
    display: block;
    padding: 18px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
    position: relative;
}

.sidebar ul li a:hover, .sidebar ul li a.active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(99, 102, 241, 0.15) 100%);
    color: var(--primary-blue);
    border-right: 4px solid var(--primary-blue);
    font-weight: 600;
    transform: translateX(5px);
    box-shadow: inset 0 0 10px rgba(79, 70, 229, 0.1);
}

.content {
    padding: 30px;
    background: var(--bg-secondary);
    overflow-y: auto;
}

/* Table Improvements */
.table-wrap {
    overflow: auto;
    max-height: 70vh;
    border: 1px solid var(--border-light);
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, #F8FAFC 100%);
    border-bottom: 2px solid var(--border-medium);
    padding: 16px 18px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    background: var(--bg-primary);
}

.data-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.02) 0%, rgba(16, 185, 129, 0.02) 100%);
}

.footer {
    text-align: center;
    padding: 25px;
    color: var(--text-muted);
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    margin-top: auto;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Enhanced Form Styles */
label {
    display: block;
    margin-top: 16px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    margin-top: 6px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Button System */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 14px;
    margin: 6px 4px;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, #E2E8F0 100%);
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--border-medium) 0%, var(--bg-tertiary) 100%);
    color: var(--text-primary);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-green) 0%, var(--secondary-green-light) 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, var(--secondary-green) 100%);
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red) 0%, #F87171 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #DC2626 0%, var(--accent-red) 100%);
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-orange) 0%, #FBBF24 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #D97706 0%, var(--accent-orange) 100%);
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
}

/* Cards and Containers */
.card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--bg-tertiary);
}

.card-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
}

/* Data View Professional Styling */
.data-view-container {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin: 20px 0;
}

.data-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-header h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
}

.search-controls {
    background: var(--bg-tertiary);
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 14px 18px 14px 45px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 15px;
    background: var(--bg-primary);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-box::before {
    content: "🔍";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-muted);
}

/* Filter Dropdown Improvements */
.data-table th {
    background: linear-gradient(135deg, #F8FAFC 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-light);
    padding: 0;
    position: relative;
    min-width: 140px;
    font-weight: 700;
    color: var(--text-primary);
}

.header-content {
    padding: 16px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.header-content:hover {
    background: rgba(79, 70, 229, 0.05);
}

.header-title {
    flex: 1;
    text-align: left;
    font-weight: 600;
}

.filter-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 14px;
    transition: all 0.2s ease;
    font-weight: bold;
}

.filter-btn:hover, .filter-btn.active {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: white;
    transform: scale(1.1);
}

.filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-top: none;
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    display: none;
    border-radius: 0 0 12px 12px;
}

.filter-dropdown.show {
    display: block;
}

.filter-search {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-tertiary);
}

.filter-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 13px;
    background: var(--bg-primary);
}

.filter-options {
    max-height: 280px;
    overflow-y: auto;
}

.filter-option {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.filter-option:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.filter-option input[type="checkbox"] {
    margin-right: 12px;
    cursor: pointer;
    transform: scale(1.1);
    accent-color: var(--primary-blue);
}

.filter-option.select-all {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, #F1F5F9 100%);
    border-bottom: 2px solid var(--border-medium);
    font-weight: 700;
    color: var(--primary-blue);
}

/* Action Buttons */
.actions {
    white-space: nowrap;
    text-align: center;
    padding: 8px;
}

.btn-edit, .btn-delete {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin: 0 3px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-edit {
    background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
    text-decoration: none;
    color: white;
    transform: translateY(-1px);
}

.btn-delete {
    background: linear-gradient(135deg, var(--accent-red) 0%, #F87171 100%);
    color: white;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #DC2626 0%, var(--accent-red) 100%);
    text-decoration: none;
    color: white;
    transform: translateY(-1px);
}

/* Stats and Data Display */
.data-stats {
    padding: 20px 30px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
}

.results-count {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .admin-grid {
        grid-template-columns: 260px 1fr;
    }
    .container {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    
    .sidebar ul {
        display: flex;
        overflow-x: auto;
        padding: 0 15px;
    }
    
    .sidebar ul li {
        border-bottom: none;
        border-right: 1px solid var(--border-light);
        flex-shrink: 0;
    }
    
    .sidebar ul li:last-child {
        border-right: none;
    }
    
    .sidebar ul li a {
        padding: 14px 18px;
        white-space: nowrap;
        font-size: 13px;
    }
    
    .content {
        padding: 20px 15px;
    }
    
    .search-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .search-box {
        min-width: auto;
    }
}

/* Accessibility and Polish */
*:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

button:focus, .btn:focus {
    outline-color: var(--accent-orange);
}

/* Smooth Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Enhanced Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}