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

:root {
    --bg-main: #071827;
    --bg-deep: #0b1d2c;
    --surface: rgba(14, 27, 40, 0.85);
    --surface-strong: rgba(17, 35, 52, 0.96);
    --surface-light: rgba(19, 45, 66, 0.8);
    --primary: #58c3ff;
    --primary-strong: #1d82ff;
    --primary-soft: rgba(88, 195, 255, 0.18);
    --accent: #f2bb65;
    --success: #56d39a;
    --warning: #f8be5a;
    --danger: #ff6b7a;
    --text: #edf7ff;
    --muted: #b8cfdf;
    --border: rgba(147, 185, 224, 0.18);
    --shadow-soft: 0 14px 30px rgba(4, 9, 18, 0.28);
    --shadow-medium: 0 24px 60px rgba(5, 10, 19, 0.38);
    --shadow-large: 0 30px 80px rgba(5, 10, 19, 0.48);
    --gradient-primary: linear-gradient(135deg, #58c3ff 0%, #1d82ff 50%, #635bff 100%);
    --gradient-hero: linear-gradient(135deg, #071827 0%, #0d2640 35%, #12375a 100%);
    --gradient-success: linear-gradient(135deg, #7ae7b8 0%, #2ec27d 100%);
    --gradient-warning: linear-gradient(135deg, #ffd38a 0%, #f2bb65 100%);
    --gradient-danger: linear-gradient(135deg, #ff91a0 0%, #ff5d72 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    background: var(--gradient-hero);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(88, 195, 255, 0.13), transparent 30%),
        radial-gradient(circle at bottom left, rgba(99, 91, 255, 0.12), transparent 35%);
    pointer-events: none;
    z-index: 0;
}

* {
    box-sizing: border-box;
}

img,
svg {
    display: block;
    max-width: 100%;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 24, 39, 0.7);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(146, 176, 226, 0.14);
    box-shadow: 0 10px 25px rgba(2, 7, 13, 0.18);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 86px;
}

.logo h1 {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(1.5rem, 2vw, 2rem);
    font-weight: 800;
    color: #f0f8ff;
    letter-spacing: 0.2px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--gradient-primary);
    box-shadow: 0 12px 25px rgba(88, 195, 255, 0.45);
    color: white;
    flex-shrink: 0;
}

nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

nav a:hover {
    background: rgba(88, 195, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(88, 195, 255, 0.25);
    transform: translateY(-1px);
}

.hero {
    position: relative;
    padding: 86px 0 70px;
    margin: 28px 0 40px;
    background: linear-gradient(135deg, rgba(9, 20, 31, 0.88), rgba(14, 42, 64, 0.92));
    border: 1px solid var(--border);
    border-radius: 32px;
    box-shadow: var(--shadow-large);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(88, 195, 255, 0.18), transparent 28%),
        radial-gradient(circle at 80% 0%, rgba(99, 91, 255, 0.22), transparent 30%);
}

.hero .container {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(88, 195, 255, 0.12);
    border: 1px solid rgba(88, 195, 255, 0.2);
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(2.7rem, 5vw, 5rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #f8fbff, #7ed6ff, #afccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 14px 35px rgba(88, 195, 255, 0.18);
}

.hero h2,
.hero h3 {
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 600;
    color: #edf7ff;
    margin-bottom: 10px;
}

.subtitle {
    font-size: clamp(1.05rem, 1.8vw, 1.5rem);
    color: var(--muted);
    margin-top: 12px;
}

.how-it-works {
    margin-bottom: 60px;
}

.how-it-works h2,
.form-section h2,
.detail-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(1.7rem, 2vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 28px;
    color: var(--text);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
}

.step,
.stat-card,
.problem-form,
.login-container,
.problem-detail,
.filters-section,
.problems-list {
    background: rgba(14, 27, 40, 0.8);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

.step {
    position: relative;
    padding: 26px 22px 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}

.step::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.step:hover {
    transform: translateY(-8px);
    border-color: rgba(88, 195, 255, 0.5);
    box-shadow: var(--shadow-medium);
}

.step:hover::before {
    opacity: 1;
}

.step-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.step-number {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(88, 195, 255, 0.28);
}

.step i,
.stat-icon i,
.login-icon i,
.filter-group label i,
.detail-section h2 i,
.hero-badge i,
.form-section h2 i,
.how-it-works h2 i {
    color: var(--accent);
}

.step i {
    font-size: 1.3rem;
}

.step h3 {
    margin-bottom: 12px;
    font-size: 1.35rem;
    color: var(--text);
}

.step p {
    color: var(--muted);
    font-size: 1rem;
}

.form-section {
    max-width: 840px;
    margin: 0 auto 60px;
}

.form-subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 26px;
}

.privacy-notice {
    background: rgba(88, 195, 255, 0.08);
    border: 1px solid rgba(88, 195, 255, 0.22);
    border-right: 4px solid var(--primary);
    border-radius: 18px;
    padding: 20px 18px;
    margin-bottom: 24px;
}

.privacy-notice p {
    color: var(--text);
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.problem-form {
    padding: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 22px;
    margin-bottom: 18px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label,
.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.required {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(140, 169, 202, 0.28);
    background: rgba(9, 20, 31, 0.8);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.form-control:focus {
    outline: none;
    border-color: rgba(88, 195, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(88, 195, 255, 0.15);
    transform: translateY(-1px);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.error {
    margin-top: 8px;
    color: #ffd4d9;
    font-size: 0.86rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 16px 28px rgba(88, 195, 255, 0.22);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-sm {
    padding: 10px 16px;
    font-size: 0.9rem;
}

.messages {
    margin: 20px 0;
}

.message {
    padding: 14px 18px;
    border-radius: 12px;
    font-weight: 700;
    margin-bottom: 12px;
    border: 1px solid transparent;
}

.message.success {
    background: rgba(86, 211, 154, 0.12);
    color: #d8ffed;
    border-color: rgba(86, 211, 154, 0.26);
}

.message.error {
    background: rgba(255, 107, 122, 0.1);
    color: #ffdfe3;
    border-color: rgba(255, 107, 122, 0.24);
}

.message.warning {
    background: rgba(248, 190, 90, 0.08);
    color: #ffe9bc;
    border-color: rgba(248, 190, 90, 0.22);
}

.message.info {
    background: rgba(88, 195, 255, 0.08);
    color: #dff5ff;
    border-color: rgba(88, 195, 255, 0.2);
}

.login-container {
    max-width: 430px;
    margin: 72px auto;
    padding: 36px 30px 28px;
}

.login-icon {
    width: 82px;
    height: 82px;
    margin: 0 auto 16px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    box-shadow: 0 18px 34px rgba(88, 195, 255, 0.28);
    font-size: 2rem;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 2rem;
}

.login-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 24px;
}

.login-form {
    text-align: right;
}

.dashboard-container {
    min-height: calc(100vh - 200px);
}

.dashboard-header {
    background: rgba(6, 17, 29, 0.7);
    border-bottom: 1px solid rgba(146, 176, 226, 0.12);
    margin-bottom: 32px;
    box-shadow: 0 10px 25px rgba(2, 7, 13, 0.14);
}

.dashboard-header .container {
    padding-top: 28px;
    padding-bottom: 28px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.dashboard-header h1 {
    font-size: clamp(1.8rem, 2.4vw, 2.7rem);
    margin-bottom: 4px;
}

.dashboard-header p {
    color: var(--muted);
    font-size: 1rem;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 26px 20px 22px;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.stat-icon {
    font-size: 2.1rem;
    margin-bottom: 12px;
}

.stat-number {
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #f7fbff, #7fd4ff 35%, #b4d0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--muted);
    font-size: 1rem;
}

.filters-section,
.problems-list,
.problem-detail {
    padding: 26px 24px;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: end;
}

.filter-group {
    flex: 1 1 220px;
}

.problems-list {
    overflow: hidden;
}

.problems-table {
    width: 100%;
    border-collapse: collapse;
}

.problems-table th,
.problems-table td {
    padding: 16px 12px;
    border-bottom: 1px solid rgba(140, 169, 202, 0.16);
    text-align: right;
    vertical-align: top;
}

.problems-table th {
    color: var(--text);
    font-size: 0.9rem;
    background: rgba(88, 195, 255, 0.06);
}

.problems-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.message-preview {
    max-width: 240px;
    color: var(--muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.status-new {
    background: rgba(88, 195, 255, 0.14);
    color: #dff6ff;
}

.status-review {
    background: rgba(248, 190, 90, 0.14);
    color: #ffe8bb;
}

.status-solved {
    background: rgba(86, 211, 154, 0.14);
    color: #dfffee;
}

.status-rejected {
    background: rgba(255, 107, 122, 0.14);
    color: #ffdfe3;
}

.empty-state {
    text-align: center;
    padding: 48px 20px 20px;
    color: var(--muted);
    font-size: 1.1rem;
}

.problem-detail {
    margin-bottom: 30px;
}

.detail-section {
    padding: 8px 0 22px;
    border-bottom: 1px solid rgba(140, 169, 202, 0.15);
    margin-bottom: 18px;
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(140, 169, 202, 0.1);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: var(--muted);
    font-weight: 700;
}

.detail-row .value {
    color: var(--text);
    font-weight: 700;
    text-align: left;
}

.message-full {
    background: rgba(7, 24, 39, 0.78);
    border: 1px solid rgba(140, 169, 202, 0.12);
    border-radius: 16px;
    padding: 22px 18px;
    color: var(--text);
    line-height: 2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.status-form {
    max-width: 420px;
}

footer {
    position: relative;
    z-index: 1;
    padding: 26px 0 34px;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid rgba(146, 176, 226, 0.12);
    background: rgba(7, 24, 39, 0.7);
}

@media (max-width: 768px) {
    .header-inner,
    .header-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    nav {
        justify-content: center;
    }

    .hero {
        padding-top: 72px;
        margin-top: 18px;
    }

    .problem-form,
    .filters-section,
    .problems-list,
    .problem-detail,
    .login-container {
        padding: 20px 16px;
    }

    .problems-table {
        display: block;
        overflow-x: auto;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn,
    .btn-sm {
        width: 100%;
    }
}

/* Selection Color */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
