/* Premium Dashboard Design System - LIGHT EDITION */
:root {
    --primary-bg: #f8fafc;
    --secondary-bg: #ffffff;
    --accent-gold: #f59e0b;
    --accent-royal: var(--primary-color, #008b97);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.08);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Dashboard Container */
.dashboard-container {
    padding: 2rem;
}

/* Utilities */
.premium-table-card .table-responsive {
    position: relative;
    overflow: visible !important;
}

.dropdown-menu {
    z-index: 9999 !important;
}

.icon-box-sm {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.extra-small { font-size: 0.75rem; }

/* Welcome Hero Section */
.bg-white-transparent {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.active-meet-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.bg-shape {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    z-index: 1;
}

.fw-extrabold { font-weight: 850; }

.welcome-section {
    position: relative;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(var(--primary-color-rgb), 0.2);
}

.welcome-section h2 {
    font-weight: 800;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 0.5rem;
}

/* Stat Cards - Enhanced */
.stat-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.03);
    border-radius: 24px;
    padding: 1.8rem;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 100%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-card.primary { background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%); border-right: 5px solid var(--primary-color); }
.stat-card.success { background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%); border-right: 5px solid #10b981; }
.stat-card.warning { background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%); border-right: 5px solid #f59e0b; }
.stat-card.danger { background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%); border-right: 5px solid #ef4444; }

.stat-icon {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #64748b;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

/* Menu Card - Reoptimized */
.menu-card {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 22px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.menu-card:hover {
    background: #fff;
    border-color: var(--accent-royal);
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 139, 151, 0.1);
}

.menu-icon {
    width: 64px;
    height: 64px;
    background: #f8fafc;
    color: var(--accent-royal);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.3s;
}

.menu-card:hover .menu-icon {
    background: var(--accent-royal);
    color: #fff;
    transform: rotate(10deg);
}

.menu-label {
    font-weight: 800;
    color: #334155;
    font-size: 0.95rem;
}

/* Table Design */
.premium-table-card {
    background: var(--secondary-bg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.table-header-custom {
    padding: 1.5rem 2rem;
    background: #fdfdfd;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.premium-table {
    margin: 0;
    width: 100%;
}

.premium-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 1.2rem 1.5rem;
    border: none;
    border-bottom: 1px solid #edf2f7;
}

.premium-table tbody td {
    padding: 1.2rem 1.5rem;
    vertical-align: middle;
    color: #475569;
    font-size: 0.9rem;
    border: none;
    border-bottom: 1px solid #f1f5f9;
}

.premium-table tbody tr:hover {
    background-color: #fcfdfe;
}

/* Action Buttons */
.action-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.action-btn-edit { background: #e0f2fe; color: #0369a1; }
.action-btn-edit:hover { background: #0369a1; color: #fff; }

.action-btn-del { background: #fee2e2; color: #b91c1c; }
.action-btn-del:hover { background: #b91c1c; color: #fff; }

.action-btn-img { background: #f1f5f9; color: #475569; }
.action-btn-img:hover { background: #475569; color: #fff; }

/* Pagination Styling */
.premium-pagination {
    padding: 1.5rem 2rem;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    border-radius: 0 0 22px 22px;
}

.page-link-custom {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    color: #64748b;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
    background: #fff;
    font-size: 0.9rem;
}

.page-link-custom:hover {
    background: #f8fafc;
    color: var(--accent-royal);
    border-color: var(--accent-royal);
}

.page-link-custom.active {
    background: var(--accent-royal);
    color: white;
    border-color: var(--accent-royal);
    box-shadow: 0 4px 10px rgba(0, 139, 151, 0.2);
}

.premium-btn {
    border-radius: 12px;
    padding: 0.6rem 1.5rem;
    font-weight: 700;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
}

.premium-btn-primary { background: var(--accent-royal); color: white; border: none; }
.premium-btn-primary:hover { background: #007681; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 139, 151, 0.3); color: #fff; }

/* Modal Design - REDESIGNED */
.modal-content {
    border: none;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
    overflow: visible;
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.75rem 2rem;
    background: #fff;
    border-radius: 24px 24px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header .btn-close {
    background-color: #f1f5f9;
    padding: 0.75rem;
    border-radius: 12px;
    margin: 0;
    transition: all 0.2s;
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    background-color: #fee2e2;
    color: #ef4444;
    opacity: 1;
    transform: rotate(90deg);
}

.modal-title {
    font-weight: 800;
    color: var(--text-main);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    background-color: #f8fafc;
    border-top: 1px solid #f1f5f9;
    border-radius: 0 0 24px 24px;
}

/* Form Styles Inside Modals */
.premium-label {
    font-weight: 700;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-input, .premium-select {
    border: 1.5px solid #e2e8f0;
    padding: 0.8rem 1.2rem;
    border-radius: 14px;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.3s;
}

.premium-input:focus {
    border-color: var(--accent-royal);
    box-shadow: 0 0 0 4px rgba(0, 139, 151, 0.1);
    outline: none;
}

.modal-icon-badge {
    width: 44px;
    height: 44px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.bg-danger-subtle { background: #fee2e2 !important; color: #b91c1c !important; }
.bg-info-subtle { background: #e0f2fe !important; color: #0369a1 !important; }
.bg-success-subtle { background: #dcfce7 !important; color: #15803d !important; }
.bg-warning-subtle { background: #fef3c7 !important; color: #d97706 !important; }
.bg-primary-subtle { background: rgba(var(--primary-color-rgb), 0.1) !important; color: var(--primary-color) !important; }

.rounded-20 { border-radius: 20px !important; }
.rounded-24 { border-radius: 24px !important; }

.shadow-md { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important; }

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.hover-lift:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.bg-light { background-color: #f8fafc !important; }
.rounded-pill { border-radius: 50rem !important; }
.fw-extrabold { font-weight: 850 !important; }

/* Mobile Table Transformation */
@media (max-width: 768px) {
    .premium-table-card {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    .table-header-custom {
        background: white !important;
        border-radius: 20px !important;
        margin-bottom: 2rem !important;
        padding: 1.5rem !important;
        box-shadow: var(--card-shadow) !important;
    }

    .table-header-custom .d-flex {
        flex-direction: column !important;
        width: 100% !important;
    }

    .table-filter-input {
        width: 100% !important;
    }

    .premium-table, 
    .premium-table thead, 
    .premium-table tbody, 
    .premium-table th, 
    .premium-table td, 
    .premium-table tr { 
        display: block !important; 
        width: 100% !important;
    }

    /* Hide table headers */
    .premium-table thead {
        display: none !important;
    }

    .premium-table tbody tr {
        background: white !important;
        margin-bottom: 1.5rem !important;
        border-radius: 20px !important;
        padding: 1rem !important;
        box-shadow: var(--card-shadow) !important;
        border: 1px solid var(--glass-border) !important;
        position: relative;
    }

    .premium-table tbody td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: right !important;
        padding: 0.8rem 0.5rem !important;
        border-bottom: 1px solid #f1f5f9 !important;
        font-size: 0.85rem !important;
    }

    .premium-table tbody td:last-child {
        border-bottom: none !important;
        justify-content: center !important;
        background: #f8fafc !important;
        margin: 0.5rem -1rem -1rem -1rem !important;
        padding: 1rem !important;
        border-radius: 0 0 20px 20px !important;
    }

    /* Special handling for actions column */
    .premium-table tbody td:last-child .gap-2,
    .premium-table tbody td:last-child .d-flex {
        justify-content: center !important;
        width: 100% !important;
    }

}


/* Premium Login Redesign - Luxury Edition */
.login-split-container {
    min-height: 100vh;
    display: flex;
    background: radial-gradient(at top right, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
}

.login-aside {
    flex: 1.2;
    background-size: cover;
    background-position: center;
    position: relative;
    display: none;
    overflow: hidden;
}

@media (min-width: 992px) {
    .login-aside { display: block; }
}

.login-aside::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(225deg, rgba(var(--primary-color-rgb), 0.9) 0%, rgba(var(--secondary-color-rgb), 0.8) 100%);
    z-index: 1;
}

/* Abstract shapes for background */
.login-aside::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: url('data:image/svg+xml,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><path fill="%23FFFFFF" fill-opacity="0.05" d="M44.7,-76.4C58.2,-69.2,70.1,-58.5,77.4,-45.4C84.7,-32.3,87.4,-16.1,86.1,-0.8C84.7,14.6,79.2,29.1,70.8,41.4C62.4,53.7,51,63.7,38,71.2C25,78.7,10.5,83.6,-4.1,89.5C-18.7,95.4,-33.4,102.3,-46.8,98.6C-60.2,94.9,-72.3,80.5,-79.8,65.3C-87.3,50.1,-90.2,34.1,-91.3,18.5C-92.4,2.9,-91.7,-12.3,-86.7,-26.3C-81.8,-40.3,-72.6,-53.1,-60.7,-60.9C-48.8,-68.7,-34.2,-71.5,-20.4,-77.8C-6.6,-84.1,6.5,-93.9,20.6,-92.9C34.7,-91.9,49.8,-80.1,44.7,-76.4Z" transform="translate(100 100)" /></svg>') no-repeat center;
    background-size: contain;
    animation: rotate 60s linear infinite;
    z-index: 2;
}

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

.login-aside-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem;
    color: white;
}

.login-main {
    width: 100%;
    max-width: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 20;
}

.login-card {
    width: 100%;
    max-width: 460px;
}

.login-header-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.05));
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease-out;
}

.login-welcome-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -1px;
    margin-bottom: 0.8rem;
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.login-welcome-subtitle {
    font-size: 1.15rem;
    color: #64748b;
    margin-bottom: 3.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.login-input-group {
    position: relative;
    margin-bottom: 1.8rem;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.login-input {
    width: 100%;
    padding: 1.4rem 1.6rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1e293b;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.login-input:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px -5px rgba(var(--primary-color-rgb), 0.15), 0 8px 10px -6px rgba(var(--primary-color-rgb), 0.1);
    transform: translateY(-2px);
    outline: none;
}

.login-floating-label {
    position: absolute;
    right: 1.6rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.login-input:focus ~ .login-floating-label,
.login-input:not(:placeholder-shown) ~ .login-floating-label {
    top: 0;
    right: 1.4rem;
    background: #fff;
    padding: 0 0.8rem;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 800;
    border-radius: 10px;
}

.btn-login {
    width: 100%;
    padding: 1.3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 1.25rem;
    font-weight: 800;
    box-shadow: 0 20px 30px -10px rgba(var(--primary-color-rgb), 0.5);
    transition: all 0.4s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 1rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn-login:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 25px 40px -10px rgba(var(--primary-color-rgb), 0.6);
}

.login-footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.login-footer-link:hover {
    color: var(--secondary-color);
    transform: translateX(-5px);
}

/* Premium OTP Styles */
.otp-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 3rem 0;
}

.otp-box {
    width: 80px;
    height: 90px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 3.22rem;
    font-weight: 900;
    text-align: center;
    color: var(--primary-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 0 25px;
}

.otp-box:focus {
    border-color: var(--primary-color);
    background: white;
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(var(--primary-color-rgb), 0.15);
    outline: none;
}

.otp-box.filled {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.02);
}

.timer-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f1f5f9;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    width: fit-content;
    margin: 0 auto;
    font-weight: 800;
    color: #475569;
}

.timer-icon {
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.resend-link {
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s;
    opacity: 0.5;
    pointer-events: none;
}

.resend-link.active {
    opacity: 1;
    pointer-events: auto;
    color: var(--secondary-color);
}

.resend-link.active:hover {
    text-decoration: underline;
    transform: scale(1.05);
}

/* Premium Toast Notifications */
.toast-container {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 420px;
    pointer-events: none;
}

.premium-toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 1.25rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    animation: toastIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-40px) scale(0.8); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast-exit {
    animation: toastOut 0.5s ease-in forwards;
}

@keyframes toastOut {
    to { opacity: 0; transform: scale(0.9) translateY(-20px); }
}

.toast-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.toast-error .toast-icon { background: #fee2e2; color: #ef4444; }
.toast-success .toast-icon { background: #dcfce7; color: #22c55e; }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 900;
    color: #1e293b;
    font-size: 1.05rem;
    margin-bottom: 3px;
}

.toast-message {
    color: #475569;
    font-size: 0.95rem;
    font-weight: 700;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 4px;
    width: 100%;
}

.toast-error .toast-progress { background: linear-gradient(to left, #ef4444, #f87171); }
.toast-success .toast-progress { background: linear-gradient(to left, #22c55e, #4ade80); }

[dir="rtl"] .premium-toast { text-align: right; }
[dir="rtl"] .toast-progress { right: auto; left: 0; }
