:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    direction: rtl; /* For Arabic */
    background: radial-gradient(circle at top right, #1e1b4b, var(--bg-primary));
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #60a5fa);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--accent);
}

/* Auth Layout */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-card h1 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Tabs for Login */
.tabs {
    display: flex;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.25rem;
}

.tab {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tab.active {
    background: var(--glass-border);
    color: var(--text-primary);
}

.error-message {
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: 1rem;
    display: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

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

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Dashboard Table */
table th {
    font-weight: 600;
    font-size: 0.9rem;
}

table td {
    vertical-align: middle;
}

/* Floating Elements Styling */
.floating-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.support-btn {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.floating-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay .modal-content {
    width: 90%;
    max-width: 550px;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

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

.modal-header h3 {
    font-size: 1.4rem;
    background: linear-gradient(to left, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #ef4444;
}

.support-form .form-group {
    margin-bottom: 1.2rem;
}

.support-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.support-form input, 
.support-form select, 
.support-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.support-form input:focus, 
.support-form select:focus, 
.support-form textarea:focus {
    border-color: var(--accent);
}

.support-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent), #60a5fa);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

@media (max-width: 768px) {
    .support-form .form-row {
        grid-template-columns: 1fr;
    }
    .floating-container {
        bottom: 20px;
        right: 20px;
    }
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    /* Responsive Glass Cards for tables */
    table thead {
        display: none !important;
    }
    table, table tbody, table tr, table td {
        display: block !important;
        width: 100% !important;
    }
    table tr {
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 12px !important;
        margin-bottom: 1rem !important;
        padding: 1rem !important;
        backdrop-filter: blur(8px) !important;
    }
    table td {
        text-align: left !important;
        padding: 0.6rem 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    table td:last-child {
        border-bottom: none !important;
    }
    table td::before {
        content: attr(data-label) ": " !important;
        font-weight: 700 !important;
        color: var(--text-secondary) !important;
        font-size: 0.85rem !important;
        margin-left: 0.5rem !important;
        order: 2 !important; /* Move label to the right side for RTL */
    }
    table td > * {
        order: 1 !important; /* Move content to the left side */
    }
}
