/* GOOGLE FONTS - Droid Arabic Kufi */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@400;500;600;700;800&display=swap');

/* Tailwind CSS Base */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Global properties */
* {
    box-sizing: border-box;
}

::selection {
    background: #9200a1 !important;
    color: #fff;
}

::-moz-selection {
    background: #9200a1 !important;
    color: #fff;
}

body {
    background: #fff;
    font: 14px 'Noto Sans Arabic', 'Droid Arabic Kufi', Arial, Helvetica, sans-serif;
    color: #1b1b1b;
    line-height: 1.42857143;
    min-width: 320px;
}

a {
    color: #9200a1;
    text-decoration: underline;
    outline: none;
    transition: all 0.3s ease-out;
}

a:hover {
    color: #9200a1;
    text-decoration: none;
    outline: none;
}

.blue-color {
    color: #9200a1;
}

/* Majbour Logo Styles - Enhanced */
.majbour-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.majbour-logo:hover {
    transform: translateY(-2px);
}

.majbour-logo img {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(146, 0, 161, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    padding: 4px;
}

.majbour-logo:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(146, 0, 161, 0.3);
}

.majbour-logo-icon {
    width: 60px;
    height: 60px;
    position: relative;
    border-radius: 50%;
    background: linear-gradient(135deg, #9200a1 0%, #7a0088 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(146, 0, 161, 0.3);
    transition: all 0.3s ease;
}

.majbour-logo-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(146, 0, 161, 0.4);
}

.majbour-logo-icon svg {
    width: 70%;
    height: 70%;
    filter: brightness(0) invert(1);
}

.majbour-logo-text {
    font-family: 'Noto Sans Arabic', 'Droid Arabic Kufi', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #1b1b1b;
    line-height: 1.2;
    transition: color 0.3s ease;
}

/* Mobile Logo */
@media (max-width: 767px) {
    .majbour-logo img {
        height: 50px !important;
        max-width: 180px !important;
    }
    
    .majbour-logo-icon {
        width: 50px;
        height: 50px;
    }
    
    .majbour-logo-text {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .majbour-logo img {
        height: 45px !important;
        max-width: 150px !important;
    }
    
    .majbour-logo-icon {
        width: 45px;
        height: 45px;
    }
}

/* Top Bar */
.top1_wrapper {
    background: #0f0819;
    border-top: 3px solid #9200a1;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Navigation */
.navbar_ {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    position: relative;
    z-index: 30;
}

.navbar_ .nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}

.navbar_ .nav > li {
    margin: 0;
}

.navbar_ .nav > li > a,
.nav-link-item {
    font-family: 'Noto Sans Arabic', 'Droid Arabic Kufi', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #6b7280 !important;
    background: transparent !important;
    padding: 12px 16px;
    border-radius: 0;
    transition: all 0.3s ease-out;
    text-decoration: none;
    display: block;
    border: none;
    position: relative;
}

.navbar_ .nav > li > a:hover,
.nav-link-item:hover {
    color: #9200a1 !important;
}

.navbar_ .nav > li.active > a,
.nav-link-item.active {
    color: #9200a1 !important;
    background: transparent !important;
}

.navbar_ .nav > li.active > a::after,
.nav-link-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #9200a1;
    width: 100%;
}

/* Mobile Navigation Links */
.mobile-nav-link {
    display: block;
    padding: 12px 20px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.mobile-nav-link:hover {
    color: #9200a1;
    background: #fafafa;
}

.mobile-nav-link.active {
    color: #9200a1;
    border-bottom-color: #9200a1;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
}

.mobile-menu.hidden {
    display: none !important;
}

@media (max-width: 767px) {
    .mobile-menu {
        display: block;
    }
    
    .majbour-logo-text {
        font-size: 16px !important;
    }
    
    .majbour-logo-icon {
        width: 35px !important;
        height: 35px !important;
        min-width: 35px !important;
    }
}

/* Buttons - Enhanced Modern Design */
.btn-form1-submit,
.btn-modern {
    border: none;
    font-family: 'Noto Sans Arabic', 'Droid Arabic Kufi', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600;
    padding: 12px 24px;
    background: linear-gradient(135deg, #9200a1 0%, #7a0088 100%);
    line-height: 1.5;
    text-align: center;
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(146, 0, 161, 0.3), 0 2px 4px -1px rgba(146, 0, 161, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-form1-submit::before,
.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-form1-submit:hover::before,
.btn-modern:hover::before {
    left: 100%;
}

.btn-form1-submit:hover,
.btn-modern:hover {
    background: linear-gradient(135deg, #a500b8 0%, #9200a1 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(146, 0, 161, 0.4), 0 4px 6px -2px rgba(146, 0, 161, 0.3);
}

.btn-form1-submit:active,
.btn-modern:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(146, 0, 161, 0.3);
}

.btn-form1-submit:focus,
.btn-modern:focus {
    outline: none;
    ring: 3px;
    ring-color: rgba(146, 0, 161, 0.3);
    ring-offset: 2px;
}

/* Cards - Enhanced Modern Design */
.card-modern {
    background: var(--card-bg, white);
    border-radius: 16px;
    box-shadow: 0 1px 3px var(--shadow, rgba(0, 0, 0, 0.08)), 0 1px 2px var(--shadow, rgba(0, 0, 0, 0.06));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color, rgba(146, 0, 161, 0.08));
    padding: 24px;
    position: relative;
    overflow: hidden;
    color: var(--text-primary, #1b1b1b);
}

.card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #9200a1, #eb9231, #9200a1);
    background-size: 200% 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px var(--shadow, rgba(0, 0, 0, 0.1)), 0 10px 10px -5px var(--shadow, rgba(0, 0, 0, 0.04));
    border-color: rgba(146, 0, 161, 0.2);
}

.card-modern:hover::before {
    transform: scaleX(1);
    animation: gradient-shift 2s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ============================================
   RESPONSIVE DESIGN - COMPREHENSIVE MOBILE SUPPORT
   ============================================ */

/* Extra Small Devices (320px - 480px) */
@media (max-width: 480px) {
    body {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .card-modern {
        padding: 12px;
        border-radius: 12px;
        margin-bottom: 12px;
    }
    
    h1 {
        font-size: 22px !important;
        padding-bottom: 12px;
        margin-bottom: 16px;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 24px !important;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 20px !important;
        line-height: 1.3;
    }
    
    .btn-form1-submit,
    .btn-modern {
        width: 100%;
        padding: 14px 16px;
        font-size: 13px !important;
        border-radius: 8px;
        min-height: 44px; /* Touch-friendly */
    }
    
    /* Statistics Cards - Mobile */
    .stat-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    /* Forms */
    .form1, .form2, .form3 {
        padding: 16px 12px;
        margin-bottom: 16px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    input[type="password"],
    textarea,
    select {
        padding: 14px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
        min-height: 44px; /* Touch-friendly */
    }
    
    label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    /* Navigation - Mobile */
    .majbour-logo img {
        height: 40px !important;
        max-width: 150px !important;
    }
    
    .mobile-menu-btn {
        padding: 10px !important;
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Gradient Headers */
    .gradient-primary,
    .gradient-secondary {
        padding: 20px 16px !important;
    }
    
    .gradient-primary h1,
    .gradient-secondary h1 {
        font-size: 24px !important;
        margin-bottom: 8px;
    }
    
    .gradient-primary p,
    .gradient-secondary p {
        font-size: 13px;
    }
}

/* Small Devices (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .card-modern {
        padding: 16px;
        border-radius: 14px;
    }
    
    h1 {
        font-size: 26px;
        padding-bottom: 14px;
        margin-bottom: 18px;
    }
    
    h2 {
        font-size: 30px;
    }
    
    h3 {
        font-size: 24px;
    }
    
    .btn-form1-submit,
    .btn-modern {
        padding: 13px 20px;
        font-size: 14px !important;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    input[type="password"],
    textarea,
    select {
        padding: 13px 14px;
        font-size: 15px;
    }
}

/* Mobile Devices (max-width: 767px) - General */
@media (max-width: 767px) {
    /* Container Padding */
    .max-w-7xl,
    .max-w-4xl,
    .max-w-3xl {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* Cards */
    .card-modern {
        padding: 16px;
        border-radius: 14px;
        margin-bottom: 16px;
    }
    
    .card-modern:hover {
        transform: none; /* Disable hover transform on mobile */
    }
    
    /* Headers */
    h1 {
        font-size: 26px;
        padding-bottom: 14px;
        margin-bottom: 18px;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 28px;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 22px;
        line-height: 1.3;
    }
    
    /* Forms */
    .form1, .form2, .form3 {
        padding: 20px 16px;
        margin-bottom: 20px;
        border-radius: 12px;
    }
    
    /* Tables - Mobile Card Layout */
    table {
        font-size: 13px;
        display: block;
        overflow-x: visible;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    table thead {
        display: none;
    }
    
    table tbody {
        display: block;
    }
    
    table tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 2px solid var(--table-border, #e5e7eb);
        border-radius: 12px;
        padding: 16px;
        background: var(--table-bg, white);
        box-shadow: 0 2px 4px var(--shadow, rgba(0, 0, 0, 0.05));
        transition: all 0.2s ease;
    }
    
    table tbody tr:last-child {
        margin-bottom: 0;
    }
    
    table tbody tr:active {
        transform: scale(0.98);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }
    
    table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 12px 0;
        border-bottom: 1px solid var(--table-border, #f3f4f6);
        border-left: none;
        border-right: none;
        color: var(--text-primary, #1f2937);
    }
    
    table tbody td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    table tbody td:first-child {
        padding-top: 0;
    }
    
    table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #9200a1;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-left: 12px;
        flex-shrink: 0;
        min-width: 100px;
    }
    
    table tbody td {
        font-size: 14px;
        font-weight: 500;
        color: var(--text-primary, #1f2937);
        flex: 1;
        text-align: left;
    }
    
    /* Action Buttons in Tables - Mobile */
    table tbody td:last-child {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    table tbody td:last-child::before {
        display: none;
    }
    
    table tbody td:last-child > div {
        display: flex;
        gap: 8px;
        justify-content: flex-start;
    }
    
    table tbody td:last-child a,
    table tbody td:last-child button {
        flex: 1;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Buttons */
    .btn-form1-submit,
    .btn-modern {
        width: 100%;
        padding: 14px 20px;
        font-size: 14px !important;
        border-radius: 10px;
        min-height: 44px; /* Touch-friendly */
        margin-bottom: 12px;
    }
    
    .btn-form1-submit:last-child,
    .btn-modern:last-child {
        margin-bottom: 0;
    }
    
    /* Statistics Cards Grid - Mobile */
    .grid.grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-4,
    .grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-4 {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    /* Charts Container - Mobile */
    .grid.grid-cols-1.lg\\:grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    /* Filter Forms - Mobile */
    form .grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    /* Footer */
    .bot1_wrapper > div > div {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 16px;
    }
    
    .bot2_wrapper > div {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 0 16px;
    }
    
    /* Navigation - Mobile Menu */
    .mobile-menu {
        background: var(--nav-bg, white);
        border-top: 2px solid var(--border-color, #e5e7eb);
        box-shadow: 0 -4px 6px var(--shadow, rgba(0, 0, 0, 0.1));
        padding: 16px;
    }
    
    .mobile-nav-link {
        padding: 14px 16px;
        font-size: 15px;
        min-height: 44px;
        display: flex;
        align-items: center;
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    /* Language Switcher - Mobile */
    .language-switcher {
        margin: 12px 0;
    }
    
    .language-btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }
    
    /* Touch-friendly spacing */
    a, button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Disable hover effects on touch devices */
    @media (hover: none) {
        .card-modern:hover {
            transform: none;
        }
        
        .btn-form1-submit:hover,
        .btn-modern:hover {
            transform: none;
        }
        
        table tbody tr:hover {
            transform: none;
        }
    }
    
    /* Active states for touch */
    .card-modern:active {
        transform: scale(0.98);
    }
    
    .btn-form1-submit:active,
    .btn-modern:active {
        transform: scale(0.97);
    }
}

/* Headers */
h1, h2, h3, h4, h5 {
    font-family: 'Noto Sans Arabic', 'Droid Arabic Kufi', sans-serif;
    color: var(--text-primary, #464646);
    transition: color 0.3s ease;
}

h1 {
    font-weight: 700;
    font-size: 36px;
    border-bottom: 4px solid #9200a1;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

h2 {
    font-weight: 600;
    font-size: 42px;
    text-align: center;
}

h3 {
    font-weight: 600;
    font-size: 42px;
    text-align: left;
}

/* Forms */
.form1, .form2, .form3 {
    background: var(--bg-secondary, #fafafa);
    padding: 30px;
    border-bottom: 3px solid #9200a1;
    margin-bottom: 20px;
    border-radius: 12px;
    transition: background-color 0.3s ease;
}

.form1 label, .form2 label, .form3 label {
    font-family: 'Noto Sans Arabic', 'Droid Arabic Kufi', sans-serif;
    font-size: 14px;
    color: var(--text-secondary, #636363);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    transition: color 0.3s ease;
}

/* Footer */
.bot1_wrapper {
    background: #252525;
    border-top: 4px solid #9200a1;
    padding-top: 35px;
    padding-bottom: 45px;
    color: #959595;
}

.bot2_wrapper {
    background: #9200a1;
    padding-top: 29px;
    padding-bottom: 29px;
    color: #fff;
    font-size: 13px;
}

.bot2_wrapper a {
    color: #fff;
    text-decoration: none;
}

.bot2_wrapper a:hover {
    text-decoration: underline;
}

/* Tables - Enhanced Modern Design */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--table-bg, white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px var(--shadow, rgba(0, 0, 0, 0.08));
    transition: background-color 0.3s ease;
}

table thead {
    background: var(--table-header-bg, linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%));
}

[data-theme="dark"] table thead {
    background: var(--table-header-bg, #0f172a);
}

table th {
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    padding: 16px 20px;
    text-align: right;
    border-bottom: 2px solid var(--table-border, #e5e7eb);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    transition: color 0.3s ease, border-color 0.3s ease;
}

table th:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: var(--table-border, #e5e7eb);
    transition: background-color 0.3s ease;
}

table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--table-border, #f3f4f6);
    background: var(--table-bg, transparent);
}

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

table tbody tr:hover {
    background: var(--table-hover, linear-gradient(90deg, #fef3ff 0%, #faf5ff 100%));
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(146, 0, 161, 0.1);
}

[data-theme="dark"] table tbody tr:hover {
    background: var(--table-hover, #334155);
}

table td {
    padding: 16px 20px;
    color: var(--text-primary, #374151);
    font-size: 14px;
    vertical-align: middle;
    transition: color 0.3s ease;
}

table tbody tr:hover td {
    color: var(--text-primary, #1f2937);
}

/* Gradients - Enhanced */
.gradient-primary {
    background: linear-gradient(135deg, #9200a1 0%, #7a0088 50%, #a500b8 100%);
    background-size: 200% 200%;
    animation: gradient-flow 8s ease infinite;
}

.gradient-secondary {
    background: linear-gradient(135deg, #01726a 0%, #00a896 50%, #9200a1 100%);
    background-size: 200% 200%;
    animation: gradient-flow 8s ease infinite;
}

@keyframes gradient-flow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Utilities */
.text-primary {
    color: #9200a1;
}

.bg-primary {
    background: #9200a1;
}

.border-primary {
    border-color: #9200a1;
}

/* Enhanced Form Inputs */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--input-border, #e5e7eb);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Noto Sans Arabic', 'Droid Arabic Kufi', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--input-bg, white);
    color: var(--text-primary, #1f2937);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #9200a1;
    box-shadow: 0 0 0 3px rgba(146, 0, 161, 0.1);
    transform: translateY(-1px);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
input[type="password"]:hover,
textarea:hover,
select:hover {
    border-color: var(--border-color, #d1d5db);
}

/* Enhanced Labels */
label {
    font-family: 'Noto Sans Arabic', 'Droid Arabic Kufi', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary, #374151);
    margin-bottom: 8px;
    transition: color 0.3s ease;
    display: block;
    transition: color 0.2s ease;
}

label:has(+ input:focus),
label:has(+ textarea:focus),
label:has(+ select:focus) {
    color: #9200a1;
}

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

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Enhanced Statistics Cards */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(146, 0, 161, 0.08);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #9200a1, #eb9231);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(146, 0, 161, 0.15);
}

.stat-card:hover::before {
    transform: scaleY(1);
}

/* Enhanced Navigation */
.navbar_ .nav > li > a,
.nav-link-item {
    border-radius: 8px;
    margin: 0 4px;
}

.navbar_ .nav > li > a:hover,
.nav-link-item:hover {
    background: rgba(146, 0, 161, 0.08) !important;
    transform: translateY(-1px);
}

.navbar_ .nav > li.active > a,
.nav-link-item.active {
    background: rgba(146, 0, 161, 0.1) !important;
    border-radius: 8px 8px 0 0;
}

/* Enhanced Badges/Tags */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.badge:hover {
    transform: scale(1.05);
}

/* Glass Morphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Enhanced Shadows */
.shadow-soft {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.shadow-medium {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.shadow-strong {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* ============================================
   MOBILE-SPECIFIC ENHANCEMENTS
   ============================================ */

/* Statistics Cards - Mobile Optimization */
@media (max-width: 767px) {
    .card-modern.p-6 {
        padding: 16px !important;
    }
    
    .card-modern .text-3xl {
        font-size: 24px !important;
    }
    
    .card-modern .w-16.h-16 {
        width: 48px !important;
        height: 48px !important;
    }
    
    .card-modern .h-8.w-8 {
        width: 20px !important;
        height: 20px !important;
    }
    
    .card-modern .text-sm {
        font-size: 12px !important;
    }
    
    .card-modern .text-xs {
        font-size: 11px !important;
    }
    
    /* Statistics Cards Layout */
    .card-modern.group .flex.items-center.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-modern.group .flex-1 {
        width: 100%;
    }
    
    .card-modern.group .w-16.h-16 {
        align-self: flex-end;
    }
}

/* Charts - Mobile Optimization */
@media (max-width: 767px) {
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .chart-container {
        position: relative;
        height: 250px !important;
        width: 100%;
        padding: 12px;
    }
    
    /* Chart.js responsive */
    .chartjs-render-monitor {
        max-width: 100% !important;
    }
}

/* Extra Small - Statistics Cards */
@media (max-width: 480px) {
    .card-modern.p-6 {
        padding: 14px !important;
    }
    
    .card-modern .text-3xl {
        font-size: 20px !important;
    }
    
    .card-modern .w-16.h-16 {
        width: 40px !important;
        height: 40px !important;
    }
    
    .card-modern .h-8.w-8 {
        width: 18px !important;
        height: 18px !important;
    }
}

/* Touch-friendly Interactive Elements */
@media (max-width: 767px) {
    /* Increase touch target size */
    a, button, input[type="button"], input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing for touch */
    .flex.gap-2 > * {
        margin: 0 4px;
    }
    
    /* Prevent text selection on buttons */
    button, a.btn-modern, .btn-form1-submit {
        -webkit-tap-highlight-color: rgba(146, 0, 161, 0.2);
        -webkit-touch-callout: none;
        user-select: none;
    }
    
    /* Better focus states for accessibility */
    button:focus,
    a:focus,
    input:focus,
    textarea:focus,
    select:focus {
        outline: 3px solid rgba(146, 0, 161, 0.3);
        outline-offset: 2px;
    }
}

/* Viewport Meta Tag Support */
@supports (-webkit-touch-callout: none) {
    /* iOS specific fixes */
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 767px) and (orientation: landscape) {
    .card-modern {
        padding: 12px;
    }
    
    h1 {
        font-size: 24px !important;
        margin-bottom: 12px;
    }
    
    .gradient-primary,
    .gradient-secondary {
        padding: 16px !important;
    }
}

/* ============================================
   DARK MODE SUPPORT - COMPREHENSIVE
   ============================================ */

/* Navigation Links - Dark Mode */
[data-theme="dark"] .nav-link-item {
    color: var(--text-secondary, #cbd5e1) !important;
}

[data-theme="dark"] .nav-link-item:hover {
    color: #b300c7 !important;
}

[data-theme="dark"] .nav-link-item.active {
    color: #b300c7 !important;
}

/* Mobile Navigation Links - Dark Mode */
[data-theme="dark"] .mobile-nav-link {
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .mobile-nav-link:hover {
    color: #b300c7;
    background: var(--bg-tertiary, #334155);
}

[data-theme="dark"] .mobile-nav-link.active {
    color: #b300c7;
    border-bottom-color: #b300c7;
}

/* Mobile Menu - Dark Mode */
[data-theme="dark"] .mobile-menu {
    background: var(--nav-bg, #1e293b);
    border-top-color: var(--border-color, #334155);
}

/* Language Dropdown - Dark Mode */
[data-theme="dark"] .language-dropdown {
    background: var(--card-bg, #1e293b);
    border-color: var(--border-color, #334155);
}

[data-theme="dark"] .language-dropdown a {
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .language-dropdown a:hover {
    background: var(--bg-tertiary, #334155);
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .language-dropdown a.active {
    background: rgba(146, 0, 161, 0.2);
    color: #b300c7;
}

/* Footer - Dark Mode */
[data-theme="dark"] .bot1_wrapper {
    background: #0f172a;
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .bot2_wrapper {
    background: #9200a1;
    color: #fff;
}

/* Table Mobile Cards - Dark Mode */
[data-theme="dark"] table tbody tr {
    background: var(--card-bg, #1e293b);
    border-color: var(--border-color, #334155);
}

[data-theme="dark"] table tbody td {
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] table tbody td::before {
    color: #b300c7;
}

/* Statistics Cards - Dark Mode */
[data-theme="dark"] .stat-card {
    background: var(--card-bg, #1e293b);
    border-color: var(--border-color, #334155);
    color: var(--text-primary, #f1f5f9);
}

/* Badges/Tags - Dark Mode */
[data-theme="dark"] .badge,
[data-theme="dark"] .tag {
    background: var(--bg-tertiary, #334155);
    color: var(--text-primary, #f1f5f9);
    border-color: var(--border-color, #475569);
}

/* Links - Dark Mode (already handled but ensure consistency) */
[data-theme="dark"] a {
    color: #b300c7;
}

[data-theme="dark"] a:hover {
    color: #eb9231;
}

/* Language Switcher Button - Dark Mode */
[data-theme="dark"] .language-btn {
    background: transparent;
    border-color: var(--border-color, #334155);
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .language-btn:hover {
    background: var(--bg-tertiary, #334155);
    border-color: #b300c7;
    color: var(--text-primary, #f1f5f9);
}

/* Mobile Menu Button - Dark Mode */
[data-theme="dark"] .mobile-menu-btn {
    background: transparent;
    border-color: var(--border-color, #334155);
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .mobile-menu-btn:hover {
    background: var(--bg-tertiary, #334155);
    border-color: #b300c7;
    color: var(--text-primary, #f1f5f9);
}

/* Top Bar - Dark Mode */
[data-theme="dark"] .top1_wrapper {
    background: #0f0819;
    border-top-color: #9200a1;
}

/* Ensure smooth transitions for all elements */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Exclude specific elements from transition */
button, a, input, textarea, select {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Print Styles - Hide on Print */
@media print {
    .mobile-menu-btn,
    .language-switcher,
    .theme-toggle,
    nav {
        display: none !important;
    }
}
