/* ============================================
   MODERN ADMIN PANEL - PREMIUM UI DESIGN
   ============================================ */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --light-bg: #f1f5f9;
    --dark-text: #1e293b;
    --border-color: #e2e8f0;
    --sidebar-width: 280px;
    --header-height: 75px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   LOGIN PAGE - PREMIUM DESIGN
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -250px;
    right: -250px;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
}

.login-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.login-logo {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-logo img {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;
}

.login-header h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--secondary-color);
    font-size: 15px;
    font-weight: 500;
}

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

.login-form label {
    display: block;
    margin-bottom: 10px;
    color: var(--dark-text);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.login-form label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.login-form input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    background: white;
    font-weight: 500;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.login-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 13px;
    color: var(--secondary-color);
    font-weight: 500;
}

/* ============================================
   ADMIN WRAPPER & LAYOUT
   ============================================ */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--light-bg);
}

/* ============================================
   SIDEBAR - PREMIUM DESIGN
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo-link {
    display: block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.sidebar-logo-link:hover {
    opacity: 0.8;
}

.sidebar-logo {
    max-width: 180px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.sidebar-header h2 {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.sidebar-header h2 i {
    margin-right: 12px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 6px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.sidebar-nav li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--gradient-primary);
    transform: scaleY(0);
}

.sidebar-nav li a i {
    margin-right: 14px;
    width: 22px;
    font-size: 18px;
}

.sidebar-nav li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-nav li a:hover::before {
    transform: scaleY(1);
}


.sidebar-nav li.active a {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.sidebar-nav li.active a::before {
    transform: scaleY(1);
}

.nav-section {
    padding: 20px 16px 10px;
}

.nav-label {
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    letter-spacing: 1.5px;
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
}

.admin-profile {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
}

.admin-profile:hover {
    background: rgba(255, 255, 255, 0.1);
}

.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    margin-right: 12px;
    box-shadow: var(--shadow-md);
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.profile-email {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.profile-dropdown {
    display: none;
    position: absolute;
    bottom: 70px;
    left: 0;
    right: 0;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-profile:hover .profile-dropdown {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 8px;
    margin: 2px 0;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.dropdown-item i {
    margin-right: 12px;
    width: 20px;
    font-size: 16px;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-header {
    background: white;
    padding: 0 35px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--dark-text);
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
}

.sidebar-toggle:hover {
    background: var(--light-bg);
}

.page-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark-text);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--dark-text) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    gap: 12px;
}

.content-wrapper {
    flex: 1;
    padding: 35px;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--light-bg);
}

/* ============================================
   BUTTONS - PREMIUM DESIGN
   ============================================ */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    display: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background: #475569;
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--dark-text);
    font-weight: 600;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-danger:hover {
    box-shadow: var(--shadow-lg);
}

/* ============================================
   CARDS - PREMIUM DESIGN
   ============================================ */
.card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    padding: 0;
    margin-bottom: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card .table-responsive {
    padding: 0;
    margin: 0;
    overflow-x: auto;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    max-height: calc(100vh - 400px);
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    flex-shrink: 1;
}

.card .table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.card .table-responsive::-webkit-scrollbar-track {
    background: transparent;
}

.card .table-responsive::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.card .table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-text);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.3px;
}

.card-header h3 i {
    color: var(--primary-color);
}

.card-body {
    padding: 0;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding: 25px 30px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.page-header h2 {
    font-size: 30px;
    font-weight: 800;
    color: var(--dark-text);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--dark-text) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    color: var(--secondary-color);
    font-size: 15px;
    font-weight: 500;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar {
    margin-bottom: 25px;
    position: relative;
}

.search-bar::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-size: 15px;
    pointer-events: none;
    z-index: 1;
}

.search-bar input {
    width: 100%;
    max-width: 500px;
    padding: 16px 22px 16px 50px;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    font-size: 15px;
    background: white;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), var(--shadow-md);
}

/* ============================================
   TABLES - PREMIUM DESIGN
   ============================================ */
.table-responsive {
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
}

.data-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    padding: 20px 24px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    color: var(--dark-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.data-table th:first-child {
    border-top-left-radius: 0;
    padding-left: 30px;
}

.data-table th:last-child {
    border-top-right-radius: 0;
    padding-right: 30px;
}

.data-table td {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: var(--dark-text);
    vertical-align: middle;
    font-weight: 500;
}

.data-table tbody tr {
    border-left: 4px solid transparent;
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.05) 0%, rgba(99, 102, 241, 0.02) 100%);
    border-left-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.table-image {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-color);
}

.table-image-placeholder {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--light-bg) 0%, #e2e8f0 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    border: 2px solid var(--border-color);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    box-shadow: var(--shadow-sm);
}

.badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   ACTION BUTTONS - DIRECT EDIT/DELETE ICONS
   ============================================ */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-icon-btn {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--secondary-color);
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.action-icon-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.action-icon-btn.edit-btn {
    border-color: var(--info-color);
    color: var(--info-color);
}

.action-icon-btn.edit-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--info-color);
    color: var(--info-color);
}

.action-icon-btn.delete-btn {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.action-icon-btn.delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.text-danger {
    color: var(--danger-color) !important;
}

/* ============================================
   MODALS - PREMIUM DESIGN
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}


.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    border: 1px solid var(--border-color);
}

.modal-large {
    max-width: 900px;
}


.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 24px 24px 0 0;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark-text);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--dark-text) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.modal form {
    padding: 32px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px 32px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0 0 24px 24px;
}

/* ============================================
   FORMS - PREMIUM DESIGN
   ============================================ */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--dark-text);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: white;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), var(--shadow-md);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: var(--secondary-color);
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   FILE UPLOAD
   ============================================ */
.file-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.file-upload input[type="file"] {
    display: none;
}

.file-label {
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
}

.file-label:hover {
    box-shadow: var(--shadow-lg);
}

.file-name {
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 500;
}

.image-preview,
.current-image {
    margin-top: 16px;
}

.image-preview img,
.current-image img {
    max-width: 250px;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--border-color);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 16px 24px;
    border-radius: 14px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-color: #10b981;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-color: #ef4444;
}

.alert i {
    font-size: 18px;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard {
    padding: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 35px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    display: none;
}

.stat-card:hover {
    box-shadow: var(--shadow-xl);
}

.stat-card:hover::before {
    display: block;
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark-text);
    margin-bottom: 6px;
    letter-spacing: -1px;
}

.stat-content p {
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--light-bg);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 24px;
}

.dashboard-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    padding: 28px;
    border: 1px solid var(--border-color);
}

.dashboard-card:hover {
    box-shadow: var(--shadow-lg);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-color);
    font-size: 15px;
    font-weight: 500;
}

/* ============================================
   CONFIRMATION MODAL
   ============================================ */
.confirm-modal {
    max-width: 480px;
    text-align: center;
    padding: 50px 40px;
}

.confirm-icon-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    border-radius: 50%;
    background: var(--gradient-danger);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
}

.confirm-icon-wrapper i {
    font-size: 48px;
    color: white;
}

.confirm-modal .confirm-icon-wrapper.info {
    background: var(--gradient-primary);
}

.confirm-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark-text);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.confirm-message {
    font-size: 16px;
    color: var(--secondary-color);
    line-height: 1.7;
    margin-bottom: 35px;
    font-weight: 500;
}

.confirm-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
}


/* ============================================
   PAGINATION
   ============================================ */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 10;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    margin-top: auto;
    width: 100%;
    flex-shrink: 0;
}

.pagination-info {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.rows-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rows-per-page .rows-label {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 600;
}

.rows-select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: white;
    color: var(--dark-text);
    cursor: pointer;
    min-width: 70px;
    font-weight: 600;
}

.rows-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.page-info {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 600;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    color: var(--dark-text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.pagination-nav:hover:not(.disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.pagination-nav.disabled {
    background: #f8fafc;
    color: #cbd5e1;
    border-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .content-wrapper {
        padding: 20px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 10px;
    }
    
    .pagination-wrapper {
        flex-direction: column;
        align-items: stretch;
        left: 0;
        padding: 15px 20px;
    }
    
    .pagination-controls {
        justify-content: space-between;
        width: 100%;
    }
    
    .pagination-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .content-wrapper {
        padding-bottom: 140px;
    }
}

/* ============================================
   ADDITIONAL ENHANCEMENTS
   ============================================ */
.rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating i {
    color: #e2e8f0;
    font-size: 14px;
    transition: all 0.2s;
}

.rating i.active {
    color: #fbbf24;
}

.rating-value {
    margin-left: 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--dark-text);
}

.message-preview {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: var(--dark-text);
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================================
   JODIT EDITOR STYLING
   ============================================ */
.jodit-container {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-top: 8px;
}

.jodit-toolbar-editor-collection {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 8px;
}

.jodit-toolbar-button {
    border-radius: 8px;
}

.jodit-toolbar-button:hover {
    background: rgba(99, 102, 241, 0.1);
}

.jodit-wysiwyg {
    min-height: 400px;
    padding: 20px;
    background: #ffffff;
    font-size: 14px;
    line-height: 1.6;
}

.jodit-statusbar {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid var(--border-color);
    padding: 8px 16px;
    font-size: 12px;
    color: var(--secondary-color);
}

.jodit-statusbar-link {
    color: var(--primary-color);
}

/* ============================================
   PROFILE PAGE - PREMIUM DESIGN
   ============================================ */
.profile-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.profile-header {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 30px;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 2px;
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark-text);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.profile-info p {
    font-size: 16px;
    color: var(--secondary-color);
    font-weight: 500;
}

.profile-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    background: white;
    padding: 8px;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    text-align: center;
    position: relative;
}

.tab-btn:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content .card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.tab-content .form-group {
    margin-bottom: 28px;
}

.tab-content .form-group:last-of-type {
    margin-bottom: 35px;
}

.tab-content .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.tab-content .form-group input[type="text"],
.tab-content .form-group input[type="email"],
.tab-content .form-group input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    color: var(--dark-text);
    background: #ffffff;
    font-family: inherit;
}

.tab-content .form-group input[type="text"]:focus,
.tab-content .form-group input[type="email"]:focus,
.tab-content .form-group input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.file-upload input[type="file"] {
    display: none;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.file-label:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.file-label i {
    font-size: 16px;
}

.file-name {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 500;
}

.image-preview {
    margin-top: 15px;
}

.image-preview img {
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
}

.tab-content .btn {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
}

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

.tab-content .btn-primary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.tab-content .btn i {
    font-size: 16px;
}

/* Responsive Profile Page */
@media (max-width: 768px) {
    .profile-page {
        padding: 20px 15px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .profile-info h2 {
        font-size: 26px;
    }
    
    .profile-tabs {
        flex-direction: column;
    }
    
    .tab-content .card {
        padding: 25px 20px;
    }
    
    .file-upload {
        flex-direction: column;
        align-items: flex-start;
    }
}
