:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-bg: #03058f;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --text-light: #64748b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--light-bg);
}

/* ===========================
   AUTH PAGE
   =========================== */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85) 0%, rgba(30, 64, 175, 0.9) 100%), url('../../img/all4.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

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

.auth-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.auth-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 700;
}

.auth-header p {
    opacity: 0.9;
    font-size: 15px;
}

.auth-form {
    padding: 35px 30px;
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

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

.auth-form h2 {
    margin-bottom: 10px;
    font-size: 24px;
    color: var(--dark-bg);
}

.otp-message {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 25px;
}

.otp-message ion-icon {
    font-size: 18px;
    vertical-align: middle;
    margin-right: 6px;
}

/* ===========================
   FORM ELEMENTS
   =========================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
}

.form-group label ion-icon {
    margin-right: 6px;
    color: var(--primary-color);
    font-size: 18px;
    vertical-align: middle;
}

.input-with-icon {
    position: relative;
}

.input-with-icon ion-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 20px;
}

.input-with-icon input {
    padding-left: 42px !important;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
}

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

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

/* OTP Input avec 6 cases */
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 25px 0;
}

.otp-inputs input {
    width: 50px;
    height: 55px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.otp-inputs input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: scale(1.05);
}

.otp-inputs input.filled {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

/* ===========================
   BUTTONS
   =========================== */

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn ion-icon {
    font-size: 18px;
    vertical-align: middle;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-secondary:hover {
    background: #475569;
}

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

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

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

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-block {
    flex: 1;
}

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

.btn-info:hover {
    background: #2563eb;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 14px;
    padding: 8px 0;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

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

/* ===========================
   MESSAGES & ALERTS
   =========================== */

.message {
    padding: 14px 16px;
    margin: 20px 30px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
    display: block;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
    display: block;
}

.message ion-icon {
    margin-right: 8px;
    font-size: 20px;
    vertical-align: middle;
}

/* ===========================
   NAVBAR
   =========================== */

.navbar {
    background: var(--dark-bg);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-brand ion-icon {
    font-size: 28px;
    color: var(--primary-color);
    vertical-align: middle;
}

.navbar-brand h1 {
    font-size: 22px;
    font-weight: 700;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-notifications {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.3s ease;
    z-index: 1000;
}

.navbar-notifications:hover {
    background: rgba(255, 255, 255, 0.1);
}

.navbar-notifications ion-icon {
    font-size: 24px;
    color: white;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1002;
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 420px;
    max-height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
}

.notifications-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 12px;
    width: 16px;
    height: 16px;
    background: white;
    transform: rotate(45deg);
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.05);
    z-index: -1;
}

.notifications-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notifications-header {
    padding: 24px 24px 16px 24px;
    background: white;
    border-bottom: 1px solid #F3F4F6;
}

.notifications-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #212121;
}

.notifications-header span {
    color: #212121;
    font-size: 20px;
    font-weight: 600;
}

.notifications-header ion-icon {
    color: #212121;
}

.notifications-tabs {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border-bottom: 1px solid #F3F4F6;
}

.notifications-tab {
    background: transparent;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.notifications-tab:hover {
    background: #F9FAFB;
    color: #212121;
}

.notifications-tab.active {
    color: #212121;
    font-weight: 600;
}

.tab-badge {
    color: #6B7280;
    font-size: 14px;
    font-weight: 500;
}

.notifications-mark-all {
    margin-left: auto;
    background: transparent;
    border: none;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notifications-mark-all:hover {
    background: #F9FAFB;
    color: #212121;
}

.notifications-mark-all ion-icon {
    font-size: 16px;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
    background: white;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid #F3F4F6;
    cursor: pointer;
    transition: background 0.15s ease;
}

.notification-item:hover {
    background: #F9FAFB;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: #F0F9FF;
}

.notification-item.unread:hover {
    background: #E0F2FE;
}

.notification-cover {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #E5E7EB;
}

.notification-content {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.notification-title {
    font-weight: 500;
    font-size: 15px;
    color: #111827;
    margin-bottom: 6px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    font-size: 13px;
    color: #9CA3AF;
}

.notifications-empty {
    padding: 60px 24px;
    text-align: center;
    color: #9CA3AF;
}

.notifications-empty ion-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.3;
    color: #D1D5DB;
}

.notifications-empty p {
    margin: 0;
    font-size: 15px;
    color: #6B7280;
}

.notifications-footer {
    padding: 16px 24px;
    border-top: 1px solid #F3F4F6;
    background: white;
}

.notifications-view-all {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    text-align: center;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notifications-view-all:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.navbar-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.navbar-user-info:hover {
    background: rgba(255, 255, 255, 0.1);
}

.navbar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.navbar-user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

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

.navbar-user-role {
    font-size: 12px;
    opacity: 0.8;
}

/* ===========================
   DASHBOARD LAYOUT
   =========================== */

.dashboard-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 280px;
    background-color: #080aa0 !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    padding: 0;
    transition: transform 0.3s ease;
    position: relative;
    color: white !important;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    cursor: pointer;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.sidebar-user-avatar:hover {
    transform: scale(1.05);
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 15px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
}

.sidebar-menu li {
    margin: 4px 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.sidebar-menu li a ion-icon {
    font-size: 20px;
    width: 22px;
    vertical-align: middle;
}

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

#logoutLink {
    background-color: #0c132f;
    color: #ffffff;
}

#logoutLink:hover {
    background-color: #060918;
}

.sidebar-menu li a.active {
    background: #0a0b61 !important;
    color: white !important;
    border-left-color: #fbbf24 !important;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 99;
}

/* ===========================
   DASHBOARD CONTENT
   =========================== */

.dashboard-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: #f9fafb;
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.view-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.view-loader.active {
    display: flex;
}

.view-loader-content {
    text-align: center;
}

.view-loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.view-loader-text {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.view-header h2 {
    font-size: 28px;
    color: var(--dark-bg);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.view-header h2 ion-icon {
    font-size: 32px;
    color: var(--primary-color);
}

/* ===========================
   TABLES
   =========================== */

.data-table {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

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

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 197, 253, 0.05) 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    position: sticky;
    top: 0;
    z-index: 10;
}

td {
    font-size: 14px;
}

td strong {
    color: #1e293b;
    font-weight: 600;
    line-height: 1.5;
}

td small {
    color: #64748b;
    font-size: 13px;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-cell-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-cell-info {
    display: flex;
    flex-direction: column;
}

.user-cell-name {
    font-weight: 600;
    color: var(--dark-bg);
}

.user-cell-email {
    font-size: 12px;
    color: var(--text-light);
}

/* ===========================
   BADGES
   =========================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge ion-icon {
    font-size: 14px;
    vertical-align: middle;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.table-cell-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-article-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* Category Badge Colors - Managers */
.category-badge.color-1 {
    background: linear-gradient(135deg, #ed2228 0%, #c91d22 100%);
}

/* Category Badge Colors - Licornes */
.category-badge.color-2 {
    background: linear-gradient(135deg, #0457d3 0%, #0348ad 100%);
}

/* Category Badge Colors - Economia */
.category-badge.color-3 {
    background: linear-gradient(135deg, #ce5105 0%, #a94204 100%);
}

/* Category Badge Colors - Innovations */
.category-badge.color-4 {
    background: linear-gradient(135deg, #e6a406 0%, #c28905 100%);
}

/* Category Badge Colors - Energies */
.category-badge.color-5 {
    background: linear-gradient(135deg, #09b960 0%, #089850 100%);
}

/* Category Badge Colors - Aspirations */
.category-badge.color-6 {
    background: linear-gradient(135deg, #6709dc 0%, #5507b8 100%);
}

/* Category Badge Colors - Strategies */
.category-badge.color-7 {
    background: linear-gradient(135deg, #626a6b 0%, #505758 100%);
}

/* Category Badge Colors - Cultures */
.category-badge.color-8 {
    background: linear-gradient(135deg, #2b3a6c 0%, #232f58 100%);
}

.blocks-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.amount-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}

.method-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--light-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* ===========================
   FORMS
   =========================== */

.article-form,
.profile-form {
    background: transparent;
    padding: 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.article-form {
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.image-preview {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    display: block;
}

/* Profile Photo Upload */
.profile-photo-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 32px;
    background: white;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.profile-photo-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-bg);
    margin: 0;
}

.profile-photo-section h4 ion-icon {
    font-size: 22px;
    color: var(--primary-color);
}

.profile-photo-content {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.profile-photo-preview {
    position: relative;
}

.profile-photo-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-photo-actions {
    display: flex;
    gap: 12px;
}

.btn-change-photo {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-change-photo:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-delete-photo {
    padding: 10px 20px;
    background: transparent;
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.profile-photo-upload-btn {
    display: none;
}

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

.profile-section {
    background: white;
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.profile-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-bg);
    margin-bottom: 24px;
}

.profile-section-title ion-icon {
    font-size: 22px;
    color: var(--primary-color);
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.profile-grid .form-group:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.profile-form .form-actions {
    margin-top: 32px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.btn-discard {
    padding: 12px 24px;
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-discard:hover {
    border-color: var(--text-color);
    background: var(--light-bg);
}

/* Cropper Modal */
.cropper-container-wrapper {
    max-height: 400px;
    margin: 20px 0;
}

/* ===========================
   MODAL
   =========================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* iziToast z-index override to appear above modals */
.iziToast-wrapper {
    z-index: 10000 !important;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleUp 0.3s ease-out;
}

@keyframes scaleUp {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-bg);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--light-bg);
    color: var(--dark-bg);
}

.modal-body {
    padding: 25px;
}

.payment-modal-content {
    max-width: 600px;
    max-height: none;
    overflow-y: visible;
    text-align: center;
}

.payment-modal-content .modal-body {
    padding: 40px 30px;
}

.payment-modal-content .modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
}

.payment-modal-content .modal-close:hover {
    color: #4b5563;
}

/* Payment Loader Overlay */
.payment-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    border-radius: 12px;
}

.payment-loader-content {
    text-align: center;
    padding: 30px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.loader-subtext {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.payment-amount {
    font-size: 72px;
    font-weight: 900;
    color: #1f2937;
    margin: 30px 0 20px;
    letter-spacing: -2px;
}

.payment-description {
    font-size: 16px;
    color: #4b5563;
    margin: 15px 0;
}

.payment-description p {
    margin: 0;
}

.payment-subtitle {
    font-size: 14px;
    color: #9ca3af;
    margin: 15px 0 30px;
}

.payment-intro {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.08) 100%);
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.payment-intro p {
    margin: 0;
}

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

/* ===========================
   PAYMENT METHODS
   =========================== */

.payment-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px auto;
    max-width: 500px;
}

.payment-method {
    position: relative;
    border: 4px solid #e5e7eb;
    border-radius: 18px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    background: white;
    aspect-ratio: 1;
}

.payment-method:hover {
    border-color: #3b82f6;
    transform: scale(1.05);
}

.payment-method:has(input[type="radio"]:checked) {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.payment-method input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-method-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 15px;
}

.payment-method-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.payment-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px auto;
    max-width: 450px;
}

.btn-payment-primary {
    background: #2563eb;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-payment-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-payment-cancel {
    background: #6b7280;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-payment-cancel:hover {
    background: #4b5563;
}

.payment-security {
    font-size: 14px;
    color: #2563eb;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 20px;
}

.phone-field-container {
    max-width: 450px;
    margin: 20px auto;
    padding: 0 20px;
}

.payment-phone-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.payment-phone-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.phone-field-hint {
    font-size: 12px;
    color: #6b7280;
    margin: 8px 0 0 4px;
}

/* ===========================
   STATS GRID
   =========================== */

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

.stat-card {
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.stat-card:first-child {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: white;
}

.stat-card:first-child h3,
.stat-card:first-child .stat-value,
.stat-card:first-child .stat-trend {
    color: white;
}

.stat-card:first-child .stat-icon {
    background: rgba(255, 255, 255, 0.2);
}

.stat-card:first-child .stat-icon ion-icon {
    color: white;
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.stat-card h3 {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.stat-card .stat-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--dark-bg);
    line-height: 1;
    margin-bottom: 12px;
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.stat-card .stat-icon ion-icon {
    font-size: 28px;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--success-color);
    font-weight: 500;
}

.stat-trend ion-icon {
    font-size: 16px;
}

.stat-trend.down {
    color: var(--danger-color);
}

/* ===========================
   CATEGORIES CARDS
   =========================== */

.categories-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px;
}

.categories-cards::-webkit-scrollbar {
    display: none;
}

.category-card {
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    width: 150px;
    height: 150px;
    min-width: 150px;
    flex-shrink: 0;
}

.category-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.category-card.active {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.category-card.all-categories {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: white;
}

.category-card.color-1 {
    background: linear-gradient(135deg, #ed2228 0%, #c91d22 100%);
    color: white;
}

.category-card.color-2 {
    background: linear-gradient(135deg, #0457d3 0%, #0348ad 100%);
    color: white;
}

.category-card.color-3 {
    background: linear-gradient(135deg, #ce5105 0%, #a94204 100%);
    color: white;
}

.category-card.color-4 {
    background: linear-gradient(135deg, #e6a406 0%, #c28905 100%);
    color: white;
}

.category-card.color-5 {
    background: linear-gradient(135deg, #09b960 0%, #089850 100%);
    color: white;
}

.category-card.color-6 {
    background: linear-gradient(135deg, #6709dc 0%, #5507b8 100%);
    color: white;
}

.category-card.color-7 {
    background: linear-gradient(135deg, #626a6b 0%, #505758 100%);
    color: white;
}

.category-card.color-8 {
    background: linear-gradient(135deg, #2b3a6c 0%, #232f58 100%);
    color: white;
}

.category-card[class*="color-"] .category-card-name,
.category-card[class*="color-"] .category-card-count,
.category-card.all-categories .category-card-name,
.category-card.all-categories .category-card-count {
    color: white;
}

.category-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    text-align: left;
    width: 100%;
}

.category-card-count {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
    text-align: right;
    width: 100%;
}

/* ===========================
   ALL ARTICLES FILTERS
   =========================== */

.all-articles-filters {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.all-articles-filters .search-box {
    flex: 1;
    min-width: 250px;
}

/* ===========================
   MISC
   =========================== */

.loading {
    text-align: center;
    padding: 50px;
    color: var(--text-light);
    font-size: 15px;
}

.loading ion-icon {
    font-size: 32px;
    margin-bottom: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.article-content {
    margin-top: 20px;
    line-height: 1.8;
    font-size: 15px;
}

.article-cover {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    min-height: 70px;
}

.action-buttons-nowrap {
    flex-wrap: nowrap;
}

.article-title-cell {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-title-cell strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-icon.btn-primary:hover {
    background: #1d4ed8;
}

.btn-icon.btn-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(100, 116, 139, 0.3);
}

.btn-icon.btn-secondary:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    box-shadow: 0 4px 8px rgba(100, 116, 139, 0.4);
    transform: translateY(-2px);
}

.btn-icon.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.btn-icon.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

.table-article-cover {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.table-article-cover:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

.table-article-cover.cover-alaune {
    border: 3px solid #e20874;
    box-shadow: 0 4px 12px rgba(226, 8, 116, 0.3);
}

.table-article-cover.cover-alaune:hover {
    box-shadow: 0 6px 20px rgba(226, 8, 116, 0.4);
}

.table-article-no-cover {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background: var(--light-bg);
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 24px;
}

.author-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.author-avatar-initials {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
}

.author-email {
    font-size: 12px;
    color: var(--text-light);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
    background: white;
    border-radius: 12px;
}

.empty-state ion-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
    color: var(--text-light);
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

/* ===========================
   PAYMENTS INTERFACE
   =========================== */

.payments-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card-icon ion-icon {
    font-size: 28px;
}

.stat-card-success .stat-card-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-card-failed .stat-card-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.stat-card-pending .stat-card-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-card-content {
    flex: 1;
}

.stat-card-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card-amount {
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
}

.payments-toolbar {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box ion-icon {
    position: absolute;
    left: 14px;
    font-size: 20px;
    color: #9ca3af;
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 44px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.filter-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.filter-btn ion-icon {
    font-size: 18px;
}

.payments-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 20px;
}

.payment-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 2px solid #f3f4f6;
    border-radius: 12px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.payment-card:hover {
    border-color: #e5e7eb;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.payment-card:last-child {
    margin-bottom: 0;
}

.payment-article-cover {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.payment-method-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
}

.payment-card-content {
    flex: 1;
    min-width: 0;
}

.payment-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.payment-card-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.payment-card-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.payment-card-transaction {
    font-size: 12px;
    color: #9ca3af;
    font-family: monospace;
}

.payment-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.payment-card-amount {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding: 20px;
    background: transparent;
    border-radius: 12px;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    background: #e2e8f0;
    color: #334155;
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 1024px) {
    .dashboard-content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .auth-page {
        padding: 0;
        background: white;
        align-items: flex-start;
    }

    .auth-container {
        padding: 0;
        max-width: 100%;
        height: 100vh;
        width: 100%;
    }

    .auth-card {
        border-radius: 0;
        box-shadow: none;
        height: 100%;
        display: flex;
        flex-direction: column;
        border: none;
    }

    .auth-header {
        padding: 40px 20px 30px;
        flex-shrink: 0;
    }
    
    #auth-forms {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    
    .auth-form {
        padding: 20px 25px;
        flex: 1;
    }

    .otp-inputs input {
        width: 45px;
        height: 50px;
        font-size: 20px;
    }

    .navbar {
        padding: 12px 15px;
    }

    .navbar-brand h1 {
        font-size: 18px;
    }

    .navbar-user-details {
        display: none;
    }

    .navbar-notifications {
        width: 36px;
        height: 36px;
    }

    .navbar-notifications ion-icon {
        font-size: 20px;
    }

    .notifications-dropdown {
        position: fixed;
        top: 70px;
        left: 15px;
        right: 15px;
        width: auto;
        max-height: 80vh;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        display: flex;
        flex-direction: column;
    }

    .notifications-dropdown::before {
        display: none;
    }

    .notifications-list {
        overflow-y: auto;
        flex: 1;
        min-height: 0;
    }

    .notifications-header {
        padding: 20px 20px 12px 20px;
    }

    .notifications-header h3 {
        font-size: 18px;
    }

    .notifications-tabs {
        padding: 10px 20px;
    }

    .notifications-mark-all span {
        display: none;
    }

    .notification-cover {
        width: 48px;
        height: 48px;
    }

    .notification-item {
        padding: 14px 20px;
        gap: 14px;
    }

    .notification-title {
        font-size: 14px;
    }

    .notification-time {
        font-size: 12px;
    }

    .notifications-footer {
        padding: 12px 20px;
    }

    .notifications-view-all {
        padding: 10px;
        font-size: 13px;
    }

    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 70px;
        height: calc(100vh - 70px);
        z-index: 98;
        transform: translateX(-100%);
    }

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

    .sidebar-header {
        padding: 15px;
    }

    .sidebar-user-avatar {
        width: 50px;
        height: 50px;
    }

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

    .sidebar-user-role {
        font-size: 12px;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dashboard-content {
        padding: 15px;
    }

    .view-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .view-header h2 {
        font-size: 22px;
    }

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

    .categories-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .all-articles-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .all-articles-filters .search-box {
        min-width: 100%;
    }

    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .payment-amount {
        font-size: 56px;
    }

    .payment-description {
        font-size: 14px;
    }

    .payment-actions {
        max-width: 100%;
    }

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

    table {
        min-width: 600px;
    }

    th, td {
        padding: 10px;
    }

    /* Payments Interface Responsive */
    .payments-stats-grid {
        grid-template-columns: 1fr;
    }

    .payments-toolbar {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    .payment-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .payment-card-right {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        font-size: 13px;
    }

    .article-form {
        padding: 20px;
    }

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

    .profile-photo-content {
        flex-direction: column;
        align-items: center;
    }

    .profile-photo-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-change-photo,
    .btn-delete-photo {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .otp-inputs {
        gap: 6px;
    }

    .otp-inputs input {
        width: 40px;
        height: 48px;
        font-size: 18px;
    }

    .profile-photo-avatar {
        width: 120px;
        height: 120px;
    }

    .btn {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

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

.view-header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box ion-icon {
    position: absolute;
    left: 12px;
    font-size: 18px;
    color: var(--text-light);
    pointer-events: none;
}

.search-box input {
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    min-width: 250px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.per-page-select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.per-page-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    margin-top: 20px;
}

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

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid transparent;
    background: #e5e7eb;
    border-radius: 100%;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    background: white;
    color: #2563eb;
    border-color: #2563eb;
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 0 8px;
    color: #9ca3af;
    font-weight: 700;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-info {
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-light);
    background: var(--light-bg);
    border-radius: 6px;
}

/* Pagination for payments */
.pagination-controls-payments {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pagination-btn-payment {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid transparent;
    background: #e5e7eb;
    border-radius: 100%;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn-payment:hover:not(:disabled):not(.active) {
    background: white;
    color: #2563eb;
    border-color: #2563eb;
    transform: translateY(-2px);
}

.pagination-btn-payment.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.pagination-btn-payment:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info-payment {
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-light);
    background: var(--light-bg);
    border-radius: 6px;
    text-align: center;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

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

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

.pagination .page-info {
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-color);
}

.user-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.user-status-badge.online {
    background: #dcfce7;
    color: #166534;
}

.user-status-badge.offline {
    background: #f3f4f6;
    color: #6b7280;
}

.user-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.user-status-indicator.online {
    background: #22c55e;
    animation: pulse 2s infinite;
}

.user-status-indicator.offline {
    background: #9ca3af;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.action-buttons .btn-toggle-status {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.action-buttons .btn-toggle-status.activate {
    background: var(--success-color);
    color: white;
}

.action-buttons .btn-toggle-status.deactivate {
    background: var(--danger-color);
    color: white;
}

.action-buttons .btn-toggle-status:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.user-cell-title {
    font-size: 12px;
    color: var(--text-light);
    font-style: italic;
}

/* ===========================
   LOADER
   =========================== */

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loader {
    width: 60px;
    height: 60px;
    position: relative;
}

.loader::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.loader::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loader-text {
    position: absolute;
    top: calc(100% + 20px);
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* ===========================
   DRAG & DROP IMAGE UPLOAD
   =========================== */

.image-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: var(--light-bg);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 15px;
}

.image-upload-zone:hover {
    border-color: var(--primary-color);
    background: #f1f5f9;
}

/* ===========================
   FIX FOR TAILWIND BUTTONS
   =========================== */
   
/* ===========================
   MODERN BUTTON STYLES (EXPLICIT)
   =========================== */

/* Reset for all modern buttons */
.action-btn-modern,
.view-toggle-btn {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: white;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    padding: 0;
    margin: 0;
    line-height: 1;
}

/* Circular Action Buttons (Edit, Delete, etc.) */
.action-btn-modern {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #475569;
}

.action-btn-modern ion-icon {
    font-size: 18px;
    pointer-events: none;
}

.action-btn-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.action-btn-modern.edit {
    background-color: #000294;
    border-color: #000294;
    color: white;
}

.action-btn-modern.edit:hover {
    background-color: #00017a;
    border-color: #00017a;
    color: white;
}

.action-btn-modern.delete {
    background-color: #d30404;
    border-color: #d30404;
    color: white;
}

.action-btn-modern.delete:hover {
    background-color: #b50303;
    border-color: #b50303;
    color: white;
}

.action-btn-modern.validate {
    background-color: #039850;
    border-color: #039850;
    color: white;
}

.action-btn-modern.validate:hover {
    background-color: #028243;
    border-color: #028243;
    color: white;
}

.action-btn-modern.pay {
    background-color: #000294;
    border-color: #000294;
    color: white;
}

.action-btn-modern.pay:hover {
    background-color: #00017a;
    border-color: #00017a;
    color: white;
}

/* View Toggle Buttons (Grid/List) */
.view-toggle-btn {
    padding: 8px 12px;
    border-radius: 6px;
    color: #64748b;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.view-toggle-btn ion-icon {
    font-size: 18px;
}

.view-toggle-btn:hover {
    color: #1e293b;
    background: #f1f5f9;
}

.view-toggle-btn.active {
    background-color: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
}

.image-upload-zone.drag-over {
    border-color: var(--primary-color);
    background: #e0f2fe;
    transform: scale(1.02);
}

.upload-placeholder ion-icon {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.upload-placeholder p {
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

.upload-placeholder small {
    display: block;
    color: var(--text-light);
    font-size: 12px;
    margin-top: 5px;
}

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

.image-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    object-fit: cover;
}

.image-preview .remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.image-preview .remove-image:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.slide-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

#coverPreview {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.cover-preview-item {
    position: relative;
    width: 150px;
    height: 150px;
}

.cover-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.remove-cover-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    font-size: 20px;
}

.remove-cover-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.slide-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.slide-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.slide-item .remove-slide {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.slide-item .remove-slide:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* ===========================
   RADIO LABELS
   =========================== */

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: var(--primary-color);
    background: #f1f5f9;
}

.radio-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-label span {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
}

/* ===========================
   TOGGLE SWITCH
   =========================== */

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    user-select: none;
    width: 100%;
}

.toggle-switch:hover {
    border-color: #cbd5e1;
    background: #fafbfc;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    display: block;
    width: 4em;
    height: 2em;
    background: #cbd5e1;
    border-radius: 2em;
    padding: 2px;
    cursor: pointer;
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: "";
    position: absolute;
    display: block;
    width: calc(2em - 4px);
    height: calc(2em - 4px);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    left: 2px;
    top: 2px;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background: #2563eb;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider::after {
    left: calc(100% - 2em + 2px);
}

.toggle-text {
    color: #374151;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

/* ===========================
   BLOCKS SECTION
   =========================== */

#blocksSection {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
}

.section-header h3 ion-icon {
    font-size: 24px;
}

.blocks-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.block-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.block-item:hover {
    box-shadow: var(--shadow-md);
}

.block-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.block-item-header h4 {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.block-item-actions {
    display: flex;
    gap: 10px;
}

.block-item-actions button {
    padding: 6px 12px;
    font-size: 12px;
}

.block-item-content {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.block-item-content p {
    margin: 0 0 10px 0;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.block-item-image {
    margin-top: 10px;
}

.block-item-image img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    object-fit: cover;
}

.block-form {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: var(--shadow-md);
}

/* ===========================
   QUILL EDITOR CUSTOMIZATION
   =========================== */

.ql-toolbar {
    background: white;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 12px !important;
}

.ql-container {
    border: 1px solid var(--border-color) !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    font-family: inherit;
    font-size: 15px;
    background: white;
}

.ql-editor {
    min-height: 200px;
    padding: 15px;
    line-height: 1.6;
    color: var(--text-color);
}

.ql-editor.ql-blank::before {
    color: var(--text-light);
    font-style: normal;
}

.ql-snow .ql-stroke {
    stroke: var(--text-color);
}

.ql-snow .ql-fill {
    fill: var(--text-color);
}

.ql-snow .ql-picker-label {
    color: var(--text-color);
}

.ql-toolbar button:hover,
.ql-toolbar button:focus,
.ql-toolbar button.ql-active,
.ql-toolbar .ql-picker-label:hover,
.ql-toolbar .ql-picker-label.ql-active {
    color: var(--primary-color) !important;
}

.ql-toolbar button:hover .ql-stroke,
.ql-toolbar button:focus .ql-stroke,
.ql-toolbar button.ql-active .ql-stroke,
.ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-toolbar .ql-picker-label.ql-active .ql-stroke {
    stroke: var(--primary-color) !important;
}

.ql-toolbar button:hover .ql-fill,
.ql-toolbar button:focus .ql-fill,
.ql-toolbar button.ql-active .ql-fill,
.ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-toolbar .ql-picker-label.ql-active .ql-fill {
    fill: var(--primary-color) !important;
}

.ql-snow .ql-tooltip {
    background: white;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    padding: 8px 12px;
}

.ql-snow .ql-tooltip input[type=text] {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
}

.ql-snow .ql-tooltip a.ql-action::after {
    content: 'Modifier';
}

.ql-snow .ql-tooltip a.ql-remove::before {
    content: 'Supprimer';
}

.ql-editor h1,
.ql-editor h2,
.ql-editor h3 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: var(--text-color);
}

.ql-editor p {
    margin-bottom: 1em;
}

.ql-editor ul,
.ql-editor ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.ql-editor blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 16px;
    margin: 1em 0;
    color: var(--text-light);
    font-style: italic;
}

.ql-editor code {
    background: var(--light-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.ql-editor pre {
    background: var(--dark-bg);
    color: white;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1em 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #59bb11;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(25px);
    -ms-transform: translateX(25px);
    transform: translateX(25px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

/* ===========================
   PAYMENTS MODERN INTERFACE
   =========================== */

.payments-modern-container {
    padding: 32px;
    max-width: 1600px;
    margin: 0 auto;
}

.payments-header {
    margin-bottom: 32px;
}

.payments-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.text-muted {
    color: #64748b;
    font-size: 14px;
}

/* Cartes de statistiques */
.stats-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Cartes de statistiques - Version Multicolore */
.stat-card-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.stat-card-blue .stat-icon {
    background: rgba(255, 255, 255, 0.2) !important;
}

.stat-card-orange {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%) !important;
}

.stat-card-orange .stat-icon {
    background: rgba(255, 255, 255, 0.2) !important;
}

.stat-card-green {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
}

.stat-card-green .stat-icon {
    background: rgba(255, 255, 255, 0.2) !important;
}

.stat-card-red {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%) !important;
}

.stat-card-red .stat-icon {
    background: rgba(255, 255, 255, 0.2) !important;
}

.stat-card-purple {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%) !important;
}

.stat-card-purple .stat-icon {
    background: rgba(255, 255, 255, 0.2) !important;
}

.stat-card-teal {
    background: linear-gradient(135deg, #5eead4 0%, #14b8a6 100%) !important;
}

.stat-card-teal .stat-icon {
    background: rgba(255, 255, 255, 0.2) !important;
}

.stat-card-success {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%) !important;
}

.stat-card-success .stat-icon {
    background: rgba(255, 255, 255, 0.2) !important;
}

.stat-card-warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
}

.stat-card-warning .stat-icon {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Texte blanc pour les cartes colorées */
.stat-card-blue .stat-label, .stat-card-blue .stat-value,
.stat-card-orange .stat-label, .stat-card-orange .stat-value,
.stat-card-green .stat-label, .stat-card-green .stat-value,
.stat-card-red .stat-label, .stat-card-red .stat-value,
.stat-card-purple .stat-label, .stat-card-purple .stat-value,
.stat-card-teal .stat-label, .stat-card-teal .stat-value,
.stat-card-success .stat-label, .stat-card-success .stat-value,
.stat-card-warning .stat-label, .stat-card-warning .stat-value {
    color: white !important;
}

.stat-card-blue .stat-icon ion-icon,
.stat-card-orange .stat-icon ion-icon,
.stat-card-green .stat-icon ion-icon,
.stat-card-red .stat-icon ion-icon,
.stat-card-purple .stat-icon ion-icon,
.stat-card-teal .stat-icon ion-icon,
.stat-card-success .stat-icon ion-icon,
.stat-card-warning .stat-icon ion-icon {
    color: white !important;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon ion-icon {
    font-size: 28px;
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

.stat-change.neutral {
    color: #6b7280;
}

.stat-change ion-icon {
    font-size: 14px;
}

/* Layout principal */
.payments-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    align-items: start;
}

/* Section tableau */
.payments-table-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 16px;
    min-width: 300px;
    height: 37px;
}

.search-box ion-icon {
    font-size: 20px;
    color: #94a3b8;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 13px;
    color: #0f172a;
    height: 100%;
    line-height: 1.5;
}

.btn-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-filter:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-filter ion-icon {
    font-size: 18px;
}

.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn-status {
    padding: 8px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn-status:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.filter-btn-status.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Tableau */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    margin-bottom: 1rem;
    width: 100%;
}

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

.payments-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #f1f5f9;
}

.payments-table tbody td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.table-row-hover:hover {
    background: #f8fafc;
    cursor: pointer;
}

/* Customer info */
.customer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.customer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.article-cover-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.customer-name {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 2px;
}

.customer-email {
    font-size: 12px;
    color: #64748b;
}

/* Payment method */
.payment-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.method-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.method-icon ion-icon {
    font-size: 18px;
    color: #3b82f6;
}

.method-icon-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge ion-icon {
    font-size: 14px;
}

.status-reussi {
    background: #dcfce7;
    color: #15803d;
}

.status-en_attente {
    background: #fef3c7;
    color: #ca8a04;
}

.status-echoue {
    background: #fee2e2;
    color: #dc2626;
}

/* Deal value */
.deal-value {
    font-weight: 700;
    color: #0f172a;
    font-size: 16px;
}

/* Panneau de statistiques */
.stats-panel {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 24px;
}

.stats-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-panel-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.stats-period-select {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
    background: white;
    cursor: pointer;
    outline: none;
}

.stats-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.stats-tab {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.stats-tab:hover {
    color: #3b82f6;
}

.stats-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.stats-amount-display {
    margin-bottom: 24px;
}

.stats-amount-value {
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.stats-amount-subtitle {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.chart-container {
    margin-bottom: 32px;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.stats-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    text-align: center;
}

.donut-chart-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.donut-chart-wrapper {
    position: relative;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

.donut-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-center-amount {
    font-size: 28px;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 4px;
}

.donut-center-growth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    color: #10b981;
    font-weight: 600;
}

.donut-center-growth ion-icon {
    font-size: 14px;
}

.donut-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 3px solid #f3f4f6;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1200px) {
    .payments-layout {
        grid-template-columns: 1fr;
    }

    .stats-panel {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .chart-container {
        height: 180px !important;
        width: 100% !important;
        max-width: 100%;
    }
    
    .donut-chart-wrapper {
        height: 200px !important;
        width: 100% !important;
        max-width: 100%;
    }

    canvas {
        max-width: 100% !important;
    }
    
    .donut-center-amount {
        font-size: 22px;
    }

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

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .section-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .search-box {
        min-width: 100%;
        width: 100%;
    }

    .filter-buttons {
        width: 100%;
        display: flex;
        gap: 8px;
        justify-content: space-between;
    }

    .filter-btn-status {
        flex: 1;
        text-align: center;
        justify-content: center;
        padding: 10px 8px;
    }

    .payments-modern-container {
        padding: 16px;
        width: 100%;
        
    }

    .payments-table-section {
        padding: 16px;
        width: 90vw;
    }

    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .payments-table {
        min-width: 800px;
        white-space: nowrap;
    }

    .payments-table thead th,
    .payments-table tbody td {
        padding: 12px 8px;
        font-size: 13px;
    }

    .customer-name {
        font-size: 13px;
    }

    .stat-value {
        font-size: 24px;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinning {
    animation: spin 1s linear infinite;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===========================
   NEW CATEGORY PILLS STYLES
   =========================== */

.category-filters-container {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding: 4px 4px 16px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    align-items: center;
}

.category-filters-container::-webkit-scrollbar {
    height: 6px;
}

.category-filters-container::-webkit-scrollbar-track {
    background: transparent;
}

.category-filters-container::-webkit-scrollbar-thumb {
    background-color: rgba(203, 213, 225, 0.5);
    border-radius: 20px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.category-pill:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    color: #334155;
}

.category-pill.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.category-pill .count-badge {
    background: rgba(0, 0, 0, 0.08);
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

.category-pill:hover .count-badge {
    background: rgba(0, 0, 0, 0.12);
    color: #1e293b;
}

.category-pill.active .count-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Active colors matching category themes */
.category-pill.active.color-1 { background: linear-gradient(135deg, #ed2228, #c91d22); border-color: #c91d22; }
.category-pill.active.color-2 { background: linear-gradient(135deg, #0457d3, #0348ad); border-color: #0348ad; }
.category-pill.active.color-3 { background: linear-gradient(135deg, #ce5105, #a94204); border-color: #a94204; }
.category-pill.active.color-4 { background: linear-gradient(135deg, #e6a406, #c28905); border-color: #c28905; }
.category-pill.active.color-5 { background: linear-gradient(135deg, #09b960, #089850); border-color: #089850; }
.category-pill.active.color-6 { background: linear-gradient(135deg, #6709dc, #5507b8); border-color: #5507b8; }
.category-pill.active.color-7 { background: linear-gradient(135deg, #626a6b, #505758); border-color: #505758; }
.category-pill.active.color-8 { background: linear-gradient(135deg, #2b3a6c, #232f58); border-color: #232f58; }
