:root {
    --primary: #4361ee;
    --primary-hover: #3a0ca3;
    --secondary: #2b2d42;
    --bg-color: #f6f8fd;
    --card-bg: #ffffff;
    --text-main: #2b2d42;
    --text-muted: #8d99ae;
    --border-color: #e9ecef;
    --success: #06d6a0;
    --input-bg: #f8f9fa;
    --shadow: 0 10px 30px rgba(67, 97, 238, 0.08);
}

html {
    overflow-y: scroll; /* Forces scrollbar to prevent layout shift between pages */
}

* { box-sizing: border-box; outline: none; }
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(67, 97, 238, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(6, 214, 160, 0.05) 0px, transparent 50%);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
}

.main-wrapper {
    width: 100%;
    max-width: 550px;
    margin-top: 80px; /* Header height compensator */
    padding: 0 20px;
    min-height: calc(100vh - 80px);
}

/* Global Header */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-logo {
    display: flex;
    align-items: center;
}

.header-nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #2b2d42; /* Dark text */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(67, 97, 238, 0.05);
}

/* Header */
.header-section {
    text-align: center;
    margin-bottom: 30px;
}
.logo-container {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
}
.logo-icon {
    font-size: 28px;
    color: white;
}
h1 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 5px;
    color: var(--secondary);
    letter-spacing: -0.5px;
}
.subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
}

/* Form Styles */
.form-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    border: 1px solid white;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2f5;
}
.card-icon {
    font-size: 18px;
    color: var(--primary);
    background: rgba(67, 97, 238, 0.1);
    padding: 8px;
    border-radius: 8px;
}
.card-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--secondary);
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Inputs with Icons */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-icon i {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    font-size: 16px;
    z-index: 2;
    transition: color 0.3s;
}
.input-with-icon input {
    padding-left: 45px;
    padding-right: 40px; /* Space for toggle button */
}
/* Toggle Icon specific */
/* Toggle Icon specific */
#togglePin {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    z-index: 10; /* High z-index */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px; /* Clickable area */
    height: 30px;
    background: transparent;
}
#togglePin:hover {
    color: var(--primary);
}
#togglePin i {
    position: static; /* Reset absolute from general rule */
}
/* RTL Support for Input Icons */
[dir="rtl"] .input-with-icon > i {
    left: auto;
    right: 15px;
}
[dir="rtl"] #togglePin {
    right: auto;
    left: 15px;
}
[dir="rtl"] .form-control {
    padding: 14px 45px 14px 16px; /* Flip padding: Right gets icon space */
}
[dir="rtl"] .input-with-icon input {
    padding-right: 45px !important; /* Lock Icon space */
    padding-left: 40px !important; /* Toggle Icon space */
    text-align: right;
}
[dir="rtl"] .input-with-icon {
    direction: rtl; /* Ensure children follow */
}
/* End RTL Support */

.form-control {
    width: 100%;
    padding: 14px 16px 14px 45px; /* Left padding for icon */
    background: var(--input-bg);
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}
.form-control:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}
.form-control:focus + i, .input-with-icon input:focus ~ i { /* This selector is tricky, we placed icon before input in HTML */
    color: var(--primary);
}
/* Since icon is before input, we use this trick: */
.input-with-icon:focus-within i {
    color: var(--primary);
}

.form-row {
    display: flex;
    gap: 15px;
}
.form-row .half {
    flex: 1;
}

/* Footer Layout */
.footer-container {
    width: 100%;
    max-width: 1200px;
    margin: 60px auto 40px;
    padding: 0 20px;
}

.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.info-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(67, 97, 238, 0.1);
    border-color: rgba(67, 97, 238, 0.1);
}

.info-icon {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 20px;
    background: rgba(67, 97, 238, 0.08);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.info-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: var(--secondary);
}

.info-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes button to bottom */
}

.read-more-btn {
    margin-top: auto;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    position: relative;
    padding-bottom: 2px;
}

.read-more-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.info-card:hover .read-more-btn::after {
    width: 100%;
}

.radio-label {
    flex: 1;
    cursor: pointer;
}
.radio-label input {
    display: none;
}
.radio-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    border: 1px solid transparent;
}
.radio-label input:checked + .radio-btn {
    background: #07122f;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.02);
}

/* Checkbox & PIN */
.pin-protection-wrapper {
    background: #f8f6ff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    border: 1px solid #efeaff;
}
.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.custom-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    margin-right: 10px;
    cursor: pointer;
}
.checkbox-wrapper label {
    cursor: pointer;
    font-weight: 600;
    color: var(--secondary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pin-input-area {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.05);
    animation: slideDown 0.3s ease;
}
.note-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
    display: block;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.2);
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(67, 97, 238, 0.3);
}
.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Animations */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .form-row { flex-direction: column; }
    .main-wrapper { margin-top: 20px; }
}

/* Language Switcher */
.lang-container {
    position: absolute;
    top: 20px;
    right: 20px;
}
.lang-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    outline: none;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}
[dir="rtl"] .input-with-icon i {
    left: auto;
    right: 16px;
}
[dir="rtl"] .form-control {
    padding: 14px 45px 14px 16px;
}
[dir="rtl"] .radio-btn i {
    margin-right: 0;
    margin-left: 6px;
}
[dir="rtl"] .custom-checkbox {
    margin-right: 0;
    margin-left: 10px;
}

/* Admin Table Styles */
.admin-wrapper {
    width: 100%;
    max-width: 1000px;
    margin-top: 40px;
}
.admin-table-container {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}
th {
    padding: 15px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
[dir="rtl"] th { text-align: right; }
td {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 14px;
    color: var(--text-main);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fcfcfc; }

.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #e0f2f1;
    color: #00695c;
}
.action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.action-btn:hover { background: var(--primary-hover); }

/* Empty/Loading State */
.table-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}
/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20b857;
}

[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 40px;
}

.my-float {
    margin-top: 1px;
}

@keyframes pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
	}
	70% {
		box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
	}
}

/* Clickable Info Cards */
.info-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}
.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.read-more-btn {
    display: inline-block;
    margin-top: 15px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.back-link {
    margin-bottom: 20px;
}
/* Detailed Page Styles */
.policy-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f2f5;
}
.policy-section:last-child {
    border-bottom: none;
}
.policy-section h3 {
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 10px;
}
.policy-section p {
    color: #4b5563;
    line-height: 1.6;
}

/* Feature Grid (About Page) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}
.feature-item {
    background: #f8faff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s;
}
.feature-item:hover {
    transform: translateY(-5px);
}
.feature-item i {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 10px;
}
.feature-item h4 {
    margin: 10px 0 5px;
    color: var(--secondary);
}
.feature-item p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Steps Container (Instructions Page) */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.step-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.step-number {
    background: var(--primary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}
.step-content h4 {
    margin: 0 0 5px;
    color: var(--secondary);
}
.step-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* Footer Layout - Overrides */
.footer-container {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.footer-container .info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 0;
}

.footer-container .info-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-container .info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(67, 97, 238, 0.1);
    border-color: rgba(67, 97, 238, 0.1);
}

.footer-container .info-icon {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 20px;
    background: rgba(67, 97, 238, 0.08);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.footer-container .info-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: var(--secondary);
}

.footer-container .info-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.footer-container .info-card .read-more-btn {
    margin-top: auto;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    position: relative;
    padding-bottom: 2px;
}

/* Hide original .info-section if it still exists outside footer (cleanup) */
body > .info-section {
    display: none;
}

/* Dark Site Footer */
.site-footer {
    background-color: #0d1117; /* Very dark blue/black */
    color: #8b949e;
    padding: 20px 0;
    margin-top: 0; /* Remove margin as it sits below the gray info section */
    border-top: 1px solid #30363d;
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #e6edf3;
}

.footer-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #8b949e;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #58a6ff;
}

.footer-social {
    display: flex;
    gap: 20px;
}

.footer-social a {
    color: #8b949e;
    font-size: 18px;
    transition: color 0.2s;
}

.footer-social a:hover {
    color: #e6edf3;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        justify-content: center;
        gap: 15px;
    }
}


/* --- Modern Floating Action Buttons (FAB) --- */

/* Shared Animation & Base */
.floating-lang-container,
.whatsapp-float {
    position: fixed;
    width: 50px;
    height: 50px;
    right: 25px;
    border-radius: 50%;
    z-index: 10001; /* Above Admin Overlay (9999) */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

/* Hover Effects */
.floating-lang-container:hover,
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 1. Language Switcher (Top) */
.floating-lang-container {
    bottom: 90px; /* 25px (bottom) + 50px (wa) + 15px (gap) */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    color: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.floating-lang-container .lang-icon {
    font-size: 20px; /* Smaller icon */
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Invisible Select Overlay */
.lang-select-floating {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    top: 0;
    left: 0;
}

/* 2. WhatsApp Widget (Bottom) */
.whatsapp-float {
    bottom: 25px;
    background-color: #25d366;
    color: #fff;
    text-decoration: none; /* Remove underline */
}

.whatsapp-float i {
    font-size: 26px;
    margin-top: 2px; /* Visual optical alignment */
}

