@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
    --syria-green: #0A6E3F;
    --syria-green-dark: #084D2C;
    --syria-green-light: #E8F5E9;
    --syria-gold: #C5A528;
    --syria-gold-light: #FFF8E1;
    --syria-red: #CE1126;
    --syria-dark: #0F172A;
    --bg: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --border: #E2E8F0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --radius: 16px;
    --header-gradient: linear-gradient(160deg, #084D2C 0%, #0A6E3F 50%, #0F7D4A 100%);
}

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

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #E8F5E9 0%, #F0FFF4 30%, #F8FAFC 60%, #FFF8E1 100%);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

/* ===== Phone Frame ===== */
.phone-container {
    width: 390px;
    height: 844px;
    background: var(--bg);
    border-radius: 50px;
    box-shadow:
        0 0 0 3px #1a1a1a,
        0 0 0 6px #333,
        0 0 0 8px #1a1a1a,
        0 30px 80px rgba(0,0,0,0.3);
    overflow: hidden;
    position: relative;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 126px;
    height: 34px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
    z-index: 100;
}

.phone-notch::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: #0d1117;
    border-radius: 50%;
    border: 2px solid #1a2332;
}

.phone-home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 134px;
    height: 5px;
    background: #333;
    border-radius: 100px;
    z-index: 100;
}

/* ===== App Screen ===== */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-30px);
}

.screen.slide-left {
    transform: translateX(30px);
    opacity: 0;
    pointer-events: none;
}

/* ===== Syrian Flag Bar ===== */
.flag-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
}

.flag-bar span:nth-child(1) { background: #CE1126; height: 3px; }
.flag-bar span:nth-child(2) { background: #FFFFFF; height: 3px; }
.flag-bar span:nth-child(3) { background: #000000; height: 3px; }

/* ===== Status Bar ===== */
.status-bar {
    padding: 14px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    position: relative;
    z-index: 50;
    height: 50px;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== Header ===== */
.app-header {
    position: relative;
    flex-shrink: 0;
    background: var(--header-gradient);
    padding-bottom: 0;
    overflow: visible;
    z-index: 10;
}

.app-header-content {
    padding: 3px 20px 24px;
}

.app-header-curve {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.app-header-curve svg {
    display: block;
    width: 100%;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
    background: var(--bg);
}

.main-content::-webkit-scrollbar {
    width: 3px;
}
.main-content::-webkit-scrollbar-track {
    background: transparent;
}
.main-content::-webkit-scrollbar-thumb {
    background: rgba(10, 110, 63, 0.15);
    border-radius: 100px;
}

/* ===== Cards ===== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.5);
    transition: transform 0.2s ease;
}

.card:active {
    transform: scale(0.98);
}

/* ===== Buttons ===== */
.btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 16px;
    background: var(--header-gradient);
    color: white;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text-secondary);
    font-family: 'Cairo', sans-serif;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-pay {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 10px;
    background: var(--header-gradient);
    color: white;
    font-family: 'Cairo', sans-serif;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 28px;
    z-index: 50;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-item.active {
    color: var(--syria-green);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    width: 24px;
    height: 3px;
    background: var(--syria-green);
    border-radius: 0 0 4px 4px;
}

.nav-item svg {
    width: 22px;
    height: 22px;
}

/* ===== Notification Dot ===== */
.notif-dot {
    position: absolute;
    top: -2px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: var(--syria-red);
    border-radius: 50%;
    border: 2px solid white;
}

/* ===== Toggle Switch ===== */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: #CBD5E1;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.toggle.active {
    background: var(--syria-green);
}

.toggle::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle.active::after {
    transform: translateX(20px);
}

/* ===== Status Badge ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 9px;
    font-weight: 700;
}

.badge-new { background: #FEE2E2; color: #CE1126; }
.badge-paid { background: #E8F5E9; color: #0A6E3F; }
.badge-overdue { background: #FEF3C7; color: #B7791F; }
.badge-active { background: #E8F5E9; color: #0A6E3F; }
.badge-gold { background: #FFF8E1; color: #C5A528; }

/* ===== Filter Tabs ===== */
.filter-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 0;
}

.filter-tab {
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-secondary);
    font-family: 'Cairo', sans-serif;
}

.filter-tab.active {
    background: var(--header-gradient);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

/* ===== Form Inputs ===== */
.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg);
    outline: none;
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--syria-green);
    box-shadow: 0 0 0 3px rgba(10, 110, 63, 0.1);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
}

/* ===== Search Input ===== */
.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.search-input:focus {
    border-color: rgba(255,255,255,0.4);
}

/* ===== Bar Chart ===== */
.bar-chart {
    display: flex;
    align-items: flex-end;
    height: 40px;
    gap: 6px;
}

.bar {
    flex: 1;
    background: rgba(255,255,255,0.4);
    border-radius: 4px 4px 0 0;
    transition: height 0.8s ease, background 0.2s ease;
    cursor: pointer;
}

.bar:hover {
    background: rgba(255,255,255,0.7);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

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

@keyframes pulseRing {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes loadingDot {
    0%, 20% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
    80%, 100% { opacity: 0.3; transform: scale(0.8); }
}

@keyframes barGrow {
    from { height: 0; }
}

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

.anim-fade-up { animation: fadeInUp 0.5s ease forwards; opacity: 0; }
.anim-fade { animation: fadeIn 0.5s ease forwards; opacity: 0; }
.anim-scale { animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; opacity: 0; }
.anim-slide-right { animation: slideInRight 0.5s ease forwards; opacity: 0; }

.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }
.anim-delay-5 { animation-delay: 0.5s; }
.anim-delay-6 { animation-delay: 0.6s; }
.anim-delay-7 { animation-delay: 0.7s; }
.anim-delay-8 { animation-delay: 0.8s; }
.anim-delay-10 { animation-delay: 1s; }
.anim-delay-12 { animation-delay: 1.2s; }
.anim-delay-14 { animation-delay: 1.4s; }
.anim-delay-15 { animation-delay: 1.5s; }
.anim-delay-18 { animation-delay: 1.8s; }
.anim-delay-20 { animation-delay: 2s; }

/* ===== Glass Effect ===== */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ===== Settings Items ===== */
.settings-group {
    margin-bottom: 16px;
}

.settings-group-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding: 0 4px;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.settings-item:first-child {
    border-radius: var(--radius) var(--radius) 0 0;
}

.settings-item:last-child {
    border-radius: 0 0 var(--radius) var(--radius);
}

.settings-item:only-child {
    border-radius: var(--radius);
}

.settings-item:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.settings-item:hover {
    background: var(--bg);
}

.settings-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.settings-icon svg {
    width: 16px;
    height: 16px;
}

.settings-label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

/* ===== Responsive ===== */
@media (max-width: 420px) {
    .phone-container {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
        box-shadow: none;
    }
    .phone-notch, .phone-home-indicator {
        display: none;
    }
    body {
        align-items: flex-start;
    }
}
