@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');

:root {
    --primary-blue: #003366;
    --secondary-blue: #00509d;
    --accent-blue: #0077b6;
    --success-green: #10b981;
    --warning-amber: #f59e0b;
    --danger-red: #ef4444;
    --white-gradient: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    --text-dark: #1e293b;
    --text-light: #64748b;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background: var(--white-gradient);
    color: var(--text-dark);
    direction: rtl;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 100%;
}

header {
    background-color: var(--primary-blue);
    color: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
}

footer {
    margin-top: auto;
    padding: 3rem 1rem;
    background: var(--primary-blue);
    color: white;
    text-align: center;
}

/* Components */
.card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 51, 102, 0.05);
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 51, 102, 0.2);
}

.btn-success {
    background-color: var(--success-green);
    color: white;
}

.btn-outline {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

th,
td {
    padding: 1.2rem 1rem;
    text-align: right;
    border-bottom: 1px solid #f1f5f9;
}

th {
    background: #f8fafc;
    color: var(--primary-blue);
    font-weight: 800;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.form-control {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background: #fdfdfd;
}

.form-control:focus {
    border-color: var(--accent-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 119, 182, 0.1);
}

/* Grid System */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.info-item {
    padding: 1.2rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #edf2f7;
    transition: all 0.3s ease;
}

.info-item:hover {
    border-color: var(--accent-blue);
    background: #fff;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.3rem;
}

.info-value {
    font-weight: 700;
    color: var(--primary-blue);
    display: block;
    font-size: 1.1rem;
}

/* Stepper */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3.5rem;
    position: relative;
    padding: 0 1rem;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 45px;
    height: 45px;
    background-color: #e2e8f0;
    color: #94a3b8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem;
    font-weight: 800;
    font-size: 1.2rem;
    transition: all 0.4s ease;
    border: 4px solid white;
    box-shadow: 0 0 0 1px #e2e8f0;
}

.step.active .step-number {
    background-color: var(--secondary-blue);
    color: white;
    box-shadow: 0 0 0 1px var(--secondary-blue);
}

.step.completed .step-number {
    background-color: var(--success-green);
    color: white;
    box-shadow: 0 0 0 1px var(--success-green);
}

/* Landing Page Elements */
.hero {
    background: var(--primary-blue);
    color: white;
    padding: 8rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.logo-img {
    width: 120px;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    color: var(--primary-blue);
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-blue);
    border-radius: 2px;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin: 4rem 0;
}

.step-item {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    border: 1px solid #f1f5f9;
    transition: all 0.4s ease;
}

.step-item:hover {
    transform: translateY(-12px);
    border-color: var(--accent-blue);
    box-shadow: 0 20px 40px rgba(0, 51, 102, 0.08);
}

.step-badge {
    position: absolute;
    top: -20px;
    right: 25px;
    background: var(--primary-blue);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 51, 102, 0.3);
}

.step-icon-wrapper {
    width: 80px;
    height: 80px;
    background: #f0f7ff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--secondary-blue);
    font-size: 2.2rem;
}

.download-box {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border-right: 6px solid var(--accent-blue);
    padding: 2.5rem;
    border-radius: 15px;
    margin: 4rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.btn-download {
    background: var(--success-green);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-download:hover {
    background: #059669;
    transform: scale(1.05);
}

.payment-section {
    background: white;
    padding: 4rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin: 4rem 0;
    display: flex;
    align-items: center;
    gap: 3rem;
    border: 1px solid #f1f5f9;
}

.payment-content {
    flex: 1.5;
}

.payment-image {
    flex: 1;
    text-align: center;
}

.payment-image img {
    max-width: 100%;
    border-radius: 15px;
}

.bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.bank-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: var(--primary-blue);
}

.hobby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin: 1.5rem 0;
}

.hobby-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.hobby-item:hover {
    color: var(--secondary-blue);
}

/* Admin Specific */
.admin-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

/* Alerts */
.alert {
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.alert-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fef3c7;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .download-box {
        flex-direction: column;
        text-align: center;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .stepper {
        overflow-x: auto;
        padding-bottom: 1rem;
    }

    .step {
        min-width: 100px;
    }
}

/* Assistant */
.chatbot-bubble {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--primary-blue) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 51, 102, 0.3);
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-window {
    position: fixed;
    bottom: 110px;
    left: 30px;
    width: 380px;
    max-height: 550px;
    height: 70vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: chatSlideUp 0.4s ease-out;
}

@keyframes chatSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: var(--primary-blue);
    padding: 1.2rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-body {
    flex: 1;
    padding: 1.2rem;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.msg {
    max-width: 85%;
    padding: 0.8rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.msg-bot {
    background: white;
    align-self: flex-start;
    border-bottom-right-radius: 2px;
    border: 1px solid #edf2f7;
}

.msg-user {
    background: var(--secondary-blue);
    color: white;
    align-self: flex-end;
    border-bottom-left-radius: 2px;
}

.chat-footer {
    padding: 0.8rem;
    background: white;
    display: flex;
    gap: 8px;
    border-top: 1px solid #edf2f7;
}

.chat-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    outline: none;
}

.chat-send {
    background: var(--primary-blue);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

.quick-reply-btn {
    background: #f1f5f9;
    padding: 0.5rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--primary-blue);
    cursor: pointer;
    border: 1px solid #e2e8f0;
    font-weight: 600;
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100% - 30px);
        left: 15px;
        right: 15px;
        bottom: 100px;
    }
}