/* ==================== RESET & TOKENS ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0f766e;
    --primary-dark: #115e59;
    --primary-light: #14b8a6;
    --secondary: #0284c7;
    --accent: #f59e0b;
    --success: #059669;
    --warning: #d97706;
    --error: #dc2626;
    --info: #0284c7;

    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #475569;
    --light: #f8fafc;
    --white: #0f172a;
    --surface: #ffffff;
    --surface-soft: rgba(255, 255, 255, 0.82);

    --gradient-primary: linear-gradient(135deg, #0284c7 0%, #14b8a6 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);

    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(15, 23, 42, 0.1);

    --font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    --font-display: 'Sora', 'Plus Jakarta Sans', sans-serif;

    --container-width: 1200px;
    --section-padding: 72px 0;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 34px 68px rgba(15, 23, 42, 0.16);
    --blur: blur(12px);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background:
        radial-gradient(circle at 8% 15%, rgba(2, 132, 199, 0.16) 0%, transparent 36%),
        radial-gradient(circle at 90% 14%, rgba(20, 184, 166, 0.16) 0%, transparent 32%),
        radial-gradient(circle at 82% 82%, rgba(245, 158, 11, 0.12) 0%, transparent 34%),
        linear-gradient(180deg, #f8fbff 0%, #eef7fb 46%, #f7fafc 100%);
    color: var(--white);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(15, 23, 42, 0.04) 0.9px, transparent 0.9px);
    background-size: 24px 24px;
    opacity: 0.35;
    pointer-events: none;
    z-index: -1;
}

a {
    color: inherit;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== LAYOUT ==================== */
.main-content {
    min-height: calc(100vh - 420px);
    padding-top: 18px;
}

.section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 46px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3vw, 2.8rem);
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--gray-light);
    max-width: 760px;
    margin: 0 auto;
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--glass-border);
    padding: 14px 0;
    transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.navbar.scrolled {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.85);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: transform 0.2s ease;
}

.logo i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.32);
}

.logo:hover {
    transform: translateY(-1px);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    color: var(--gray-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 10px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-dark);
    background: rgba(20, 184, 166, 0.14);
}

.nav-auth {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 6px;
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--glass-border);
    color: var(--dark);
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.user-menu-btn:hover,
.user-menu-btn.active {
    border-color: rgba(2, 132, 199, 0.3);
    box-shadow: var(--shadow-sm);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    min-width: 190px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.22s ease;
    box-shadow: var(--shadow-lg);
}

.user-menu-btn.active + .user-dropdown,
.user-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s ease;
}

.user-dropdown a:hover {
    background: rgba(2, 132, 199, 0.08);
    color: var(--primary-dark);
}

.user-dropdown a:first-child {
    border-radius: 14px 14px 0 0;
}

.user-dropdown a:last-child {
    border-radius: 0 0 14px 14px;
}

.mobile-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--glass-border);
    color: var(--dark);
    font-size: 1.05rem;
    padding: 10px 13px;
    border-radius: 10px;
    cursor: pointer;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(2, 132, 199, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--glass-border);
    color: var(--dark);
}

.btn-secondary:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(2, 132, 199, 0.4);
    color: var(--primary-dark);
}

.btn-outline:hover {
    background: rgba(2, 132, 199, 0.1);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.88rem;
}

.btn-lg {
    padding: 14px 26px;
    font-size: 1.02rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--surface-soft);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(2, 132, 199, 0.2);
}

.card-clickable {
    cursor: pointer;
}

/* ==================== TOAST ==================== */
.toast-container {
    position: fixed;
    top: 84px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border-left: 4px solid;
    border-radius: 12px;
    padding: 14px 14px;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.26s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(320px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    border-color: var(--success);
}

.toast-error {
    border-color: var(--error);
}

.toast-warning {
    border-color: var(--warning);
}

.toast-info {
    border-color: var(--info);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error .toast-icon {
    color: var(--error);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-info .toast-icon {
    color: var(--info);
}

.toast-content {
    flex: 1;
    color: var(--dark);
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 4px;
}

.toast-close:hover {
    color: var(--dark);
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 12px;
    color: var(--dark);
    font-size: 0.98rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94a3b8;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.14);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 0.84rem;
    color: var(--gray);
}

.form-error {
    color: var(--error);
    font-size: 0.84rem;
    margin-top: 5px;
}

/* ==================== LOADING ==================== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(2, 132, 199, 0.16);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(15, 23, 42, 0.06) 25%,
        rgba(15, 23, 42, 0.12) 50%,
        rgba(15, 23, 42, 0.06) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 10px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==================== TAGS ==================== */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.2);
    color: var(--primary-dark);
}

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    min-width: 40px;
    text-align: center;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--dark);
    background: #ffffff;
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(20, 184, 166, 0.35);
}

.pagination .current {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #ffffff;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 54px 24px;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 18px;
    opacity: 0.6;
}

.empty-state p {
    margin-bottom: 18px;
}

/* ==================== FOOTER ==================== */
.footer {
    background: linear-gradient(180deg, #0f172a 0%, #0b1222 100%);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding: 62px 0 24px;
    margin-top: 90px;
    color: #e2e8f0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 36px;
    margin-bottom: 36px;
}

.footer-col h4,
.footer-col h5 {
    margin-bottom: 14px;
    color: #ffffff;
}

.footer-col h4 {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.footer-col p {
    color: #cbd5e1;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #67e8f9;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.social-links a:hover {
    background: rgba(103, 232, 249, 0.15);
    border-color: rgba(103, 232, 249, 0.45);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    color: #cbd5e1;
}

/* ==================== UTILITIES ==================== */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--secondary);
}

.text-muted {
    color: var(--gray);
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-40 {
    margin-top: 40px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 8px;
    }

    .nav-link {
        padding: 8px 10px;
    }
}

@media (max-width: 880px) {
    .mobile-toggle {
        display: inline-flex;
    }

    .nav-menu {
        position: fixed;
        top: 74px;
        left: 0;
        width: 100%;
        height: calc(100vh - 74px);
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: var(--blur);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 24px;
        transform: translateX(-105%);
        transition: transform 0.26s ease;
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 14px;
    }

    .nav-auth {
        width: 100%;
        flex-direction: column;
        margin-left: 0;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .main-content {
        min-height: calc(100vh - 360px);
    }

    .section {
        padding: 56px 0;
    }

    .section-header {
        margin-bottom: 34px;
    }

    .toast {
        min-width: 250px;
    }
}