/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

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

:root {
    --primary: #1A73E8;
    --secondary: #0F172A;
    --bg: #F5F7FA;
    --text: #0F172A;
    --border: #E2E8F0;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: #F8FAFC;
    border-left-color: var(--primary);
}

.menu-item.active {
    background: #EFF6FF;
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.menu-item i {
    font-size: 20px;
}

.main-content {
    flex: 1;
    margin-left: 250px;
}

.top-header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-left h1 {
    font-size: 20px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.btn-icon {
    width: 35px;
    height: 35px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: #F8FAFC;
    border-color: var(--primary);
    color: var(--primary);
}

.content-container {
    padding: 25px;
    max-width: 1400px;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #64748B;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 22px;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #1557B0;
}

.btn-success {
    background: var(--success);
    color: white;
}

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

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-outline {
    background: white;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Search Bar - FIXED */
.search-bar {
    position: relative;
    width: 300px;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px 10px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-bar i {
    position: absolute;
    left: 12px;
    top: 12px;
    color: #64748B;
    pointer-events: none;
}

/* Table */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.table-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #F8FAFC;
}

th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #64748B;
}

td {
    padding: 12px 15px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

tbody tr:hover {
    background: #F8FAFC;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge.active {
    background: #D1FAE5;
    color: #065F46;
}

.badge.inactive {
    background: #FEE2E2;
    color: #991B1B;
}

.badge.pending {
    background: #FEF3C7;
    color: #92400E;
}

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 5px;
}

.action-btn {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.action-btn.view {
    background: #ECFDF5;
    color: var(--success);
}

.action-btn.view:hover {
    background: var(--success);
    color: white;
}

.action-btn.edit {
    background: #EFF6FF;
    color: var(--primary);
}

.action-btn.edit:hover {
    background: var(--primary);
    color: white;
}

.action-btn.delete {
    background: #FEE2E2;
    color: var(--danger);
}

.action-btn.delete:hover {
    background: var(--danger);
    color: white;
}

.action-btn.print {
    background: #F3F4F6;
    color: var(--text);
}

.action-btn.print:hover {
    background: var(--secondary);
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 15px;
    border-top: 1px solid var(--border);
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 14px;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination span {
    font-size: 14px;
    color: #64748B;
}

/* Forms */
.form-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    max-width: 800px;
}

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

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

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

.form-group label {
    font-weight: 600;
    font-size: 14px;
}

.form-group label .required {
    color: var(--danger);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

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

/* File Upload */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
}

.file-upload:hover {
    border-color: var(--primary);
    background: #F8FAFC;
}

.file-upload input {
    display: none;
}

.file-preview {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Filters */
.filters-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

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

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--primary);
}

.login-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.login-header p {
    color: #64748B;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 15px;
}

.login-form .btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    justify-content: center;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Modal Dialog - CUSTOM */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748B;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: #F8FAFC;
    color: var(--text);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.error {
    background: var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block !important;
    }

    .content-container {
        padding: 15px;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 600px;
    }

    .search-bar {
        width: 100%;
    }

    .user-name {
        display: none;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .modal-dialog {
        max-width: 95%;
    }
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.hidden {
    display: none;
}