:root {
    --bg-main: #071114;
    --bg-secondary: #0b171b;
    --panel: rgba(10, 24, 29, 0.78);
    --panel-strong: rgba(8, 21, 25, 0.92);
    --border: rgba(117, 224, 231, 0.18);
    --border-strong: rgba(117, 224, 231, 0.28);
    --text-main: #eafcfd;
    --text-soft: #9fc8cc;
    --text-muted: #7fa9ad;
    --primary: #5dd4db;
    --primary-2: #3ebbc4;
    --glow: 0 0 0 1px rgba(117, 224, 231, 0.08), 0 14px 40px rgba(0, 0, 0, 0.35);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background: radial-gradient(circle at top right, rgba(93, 212, 219, 0.08), transparent 22%), radial-gradient(circle at bottom left, rgba(93, 212, 219, 0.05), transparent 25%), linear-gradient(180deg, #020506 0%, #071114 45%, #091519 100%);
    color: var(--text-main);
    overflow-x: hidden;
}

body {
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-body {
    flex: 1;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(14px);
    background: rgba(4, 10, 12, 0.75);
    border-bottom: 1px solid rgba(117, 224, 231, 0.12);
}

.topbar-container,
.footer-container,
.dashboard-page {
    width: min(1280px, 92%);
    margin: 0 auto;
}

.topbar-container {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.brand-logo-wrap {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: rgba(8, 21, 25, 0.9);
    border: 1px solid rgba(117, 224, 231, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow);
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo {
    width: 84%;
    height: 84%;
    object-fit: contain;
    display: block;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .brand-copy strong {
        font-size: 1.15rem;
        font-weight: 800;
        color: var(--text-main);
    }

    .brand-copy span {
        font-size: .92rem;
        color: var(--text-soft);
    }

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 16px;
    border-radius: 14px;
    color: var(--text-soft);
    border: 1px solid transparent;
    transition: .25s ease;
    font-weight: 700;
}

    .nav-link:hover {
        color: var(--text-main);
        background: rgba(93, 212, 219, 0.07);
        border-color: rgba(117, 224, 231, 0.12);
    }

.footer-bar {
    margin-top: 24px;
    border-top: 1px solid rgba(117, 224, 231, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.footer-container {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--text-muted);
    font-size: .95rem;
}

.dashboard-page {
    position: relative;
    padding: 34px 0 42px;
}

.ambient {
    position: fixed;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
    opacity: .35;
}

.ambient-1 {
    width: 240px;
    height: 240px;
    background: rgba(93, 212, 219, 0.14);
    top: 120px;
    right: 4%;
}

.ambient-2 {
    width: 220px;
    height: 220px;
    background: rgba(93, 212, 219, 0.08);
    bottom: 80px;
    left: 4%;
}

.ambient-3 {
    width: 160px;
    height: 160px;
    background: rgba(62, 187, 196, 0.10);
    top: 48%;
    left: 48%;
}

.hero,
.empty-state-box,
.setup-card,
.platform-card,
.modal-panel {
    position: relative;
    z-index: 1;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(14px);
}

.hero {
    border-radius: 32px;
    padding: 34px;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
    gap: 28px;
    overflow: hidden;
}

    .hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, rgba(93, 212, 219, 0.06), transparent 35%), linear-gradient(320deg, rgba(93, 212, 219, 0.03), transparent 45%);
        pointer-events: none;
    }

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    margin-bottom: 16px;
    background: rgba(93, 212, 219, 0.08);
    color: #b7f3f7;
    border: 1px solid rgba(117, 224, 231, 0.14);
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.25;
    font-weight: 900;
}

    .hero h1 span {
        color: var(--primary);
        text-shadow: 0 0 28px rgba(93, 212, 219, 0.18);
    }

.hero p {
    margin: 0;
    max-width: 760px;
    font-size: 1rem;
    line-height: 2;
    color: var(--text-soft);
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.action-btn,
.main-save-btn {
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 16px;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    transition: .25s ease;
}

.primary-btn {
    background: linear-gradient(135deg, #5dd4db, #2caeb7);
    color: #062326;
    box-shadow: 0 14px 30px rgba(93, 212, 219, 0.18);
}

.secondary-btn {
    background: rgba(93, 212, 219, 0.08);
    color: var(--text-main);
    border: 1px solid rgba(117, 224, 231, 0.18);
}

.main-save-btn {
    width: 100%;
    margin-top: 22px;
    background: linear-gradient(135deg, #5dd4db, #2caeb7);
    color: #062326;
    box-shadow: 0 14px 30px rgba(93, 212, 219, 0.18);
}

    .action-btn:hover,
    .main-save-btn:hover,
    .open-link:hover {
        transform: translateY(-2px);
        filter: brightness(1.03);
    }

.hero-visual {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.hero-logo-card {
    width: min(420px, 100%);
    min-height: 280px;
    border-radius: 28px;
    background: radial-gradient(circle at center, rgba(93, 212, 219, 0.08), rgba(4, 12, 14, 0.92)), rgba(4, 12, 14, 0.94);
    border: 1px solid rgba(117, 224, 231, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px;
    box-shadow: inset 0 0 0 1px rgba(117, 224, 231, 0.05), 0 20px 50px rgba(0, 0, 0, 0.28);
}

    .hero-logo-card img {
        width: 100%;
        max-width: 280px;
        object-fit: contain;
        display: block;
    }

.section-header {
    margin: 34px 0 18px;
}

    .section-header h2 {
        margin: 0 0 6px;
        font-size: 1.7rem;
        font-weight: 800;
    }

    .section-header p {
        margin: 0;
        color: var(--text-soft);
    }

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.platform-card {
    border-radius: 24px;
    padding: 22px;
    transition: .25s ease;
}

    .platform-card:hover {
        transform: translateY(-6px);
        border-color: var(--border-strong);
    }

.platform-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.platform-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
}

.platform-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #e7ffff;
    font-weight: 800;
    font-size: .95rem;
}

.platform-content h3 {
    margin: 0 0 10px;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main);
}

.platform-content p {
    margin: 0;
    color: rgba(234, 252, 253, 0.82);
    line-height: 1.95;
    min-height: 95px;
}

.platform-footer {
    margin-top: 22px;
}

.open-link {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-weight: 800;
    transition: .25s ease;
}

.empty-state {
    margin-top: 22px;
}

.empty-state-box {
    border-radius: 28px;
    padding: 42px 24px;
    text-align: center;
}

.empty-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 18px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: linear-gradient(135deg, #5dd4db, #2caeb7);
    color: #062326;
}

.empty-state-box h2 {
    margin: 0 0 10px;
    font-size: 1.55rem;
}

.empty-state-box p {
    margin: 0;
    color: var(--text-soft);
}

.gradient-one {
    background: linear-gradient(180deg, rgba(93, 212, 219, 0.10), rgba(10, 24, 29, 0.92)), rgba(10, 24, 29, 0.92);
}

.gradient-two {
    background: linear-gradient(180deg, rgba(0, 183, 195, 0.11), rgba(10, 24, 29, 0.92)), rgba(10, 24, 29, 0.92);
}

.gradient-three {
    background: linear-gradient(180deg, rgba(79, 224, 204, 0.10), rgba(10, 24, 29, 0.92)), rgba(10, 24, 29, 0.92);
}

.gradient-four {
    background: linear-gradient(180deg, rgba(68, 194, 207, 0.12), rgba(10, 24, 29, 0.92)), rgba(10, 24, 29, 0.92);
}

.gradient-five {
    background: linear-gradient(180deg, rgba(117, 224, 231, 0.14), rgba(10, 24, 29, 0.92)), rgba(10, 24, 29, 0.92);
}

.custom-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 10, 0.74);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

    .custom-modal.active {
        display: flex;
    }

.modal-panel {
    width: min(520px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 28px;
    padding: 28px;
}

.modal-large {
    width: min(820px, 100%);
}

.close-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 42px;
    height: 42px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-radius: 50%;
    cursor: pointer;
    transition: .2s ease;
}

    .close-btn:hover {
        background: rgba(255, 255, 255, 0.14);
    }

.modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5dd4db, #2caeb7);
    color: #062326;
    font-size: 28px;
    box-shadow: 0 12px 28px rgba(93, 212, 219, 0.18);
}

    .modal-icon.lock {
        background: linear-gradient(135deg, #6fe3ea, #42c3cb);
    }

.modal-panel h2,
.setup-title {
    margin: 0 0 8px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
}

.modal-panel p,
.setup-text {
    margin: 0 0 22px;
    text-align: center;
    color: var(--text-soft);
    line-height: 1.9;
}

.modern-input {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(117, 224, 231, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    outline: none;
    transition: .2s ease;
}

    .modern-input:focus {
        border-color: rgba(117, 224, 231, 0.34);
        box-shadow: 0 0 0 3px rgba(93, 212, 219, 0.10);
    }

    .modern-input::placeholder {
        color: #82adb1;
    }

.modern-textarea {
    min-height: 130px;
    resize: vertical;
    padding-top: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .input-group label {
        font-weight: 700;
        color: var(--text-main);
    }

.full-width {
    grid-column: 1 / -1;
}

.error-text,
.field-error {
    display: block;
    margin-top: 10px;
    text-align: center;
    color: #ff8f97;
    font-weight: 700;
}

.success-text {
    margin-top: 12px;
    text-align: center;
    color: #90f4d9;
    font-weight: 700;
}

.setup-wrapper {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
}

.setup-card {
    width: min(560px, 100%);
    border-radius: 30px;
    padding: 34px 28px;
}

.setup-logo-wrap {
    width: 130px;
    height: 130px;
    margin: 0 auto 18px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 15, 18, 0.9);
    border: 1px solid rgba(117, 224, 231, 0.12);
    box-shadow: var(--glow);
}

.setup-logo {
    width: 88%;
    height: 88%;
    object-fit: contain;
}

.setup-form {
    display: grid;
    gap: 18px;
}

@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 26px;
    }

    .hero-visual {
        order: -1;
    }

    .hero-logo-card {
        min-height: 220px;
    }
}

@media (max-width: 768px) {
    .topbar-container {
        min-height: auto;
        padding: 14px 0;
        flex-direction: column;
        align-items: stretch;
    }

    .brand {
        justify-content: center;
    }

    .topbar-nav {
        justify-content: center;
    }

    .footer-container {
        flex-direction: column;
        justify-content: center;
        padding: 14px 0;
        text-align: center;
    }

    .dashboard-page {
        padding: 22px 0 34px;
    }

    .hero {
        border-radius: 26px;
        padding: 20px;
    }

        .hero h1 {
            font-size: 1.85rem;
        }

    .hero-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .platforms-grid {
        grid-template-columns: 1fr;
    }

    .platform-content p {
        min-height: auto;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .modal-panel,
    .modal-large {
        padding: 24px 18px;
        border-radius: 24px;
    }

    .brand-copy span {
        display: none;
    }
}

@media (max-width: 480px) {
    .brand-logo-wrap {
        width: 58px;
        height: 58px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .section-header h2 {
        font-size: 1.45rem;
    }

    .platform-card {
        padding: 18px;
    }

    .open-link {
        padding: 13px 14px;
    }
}
