* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #eef2ff;

    --background: #f8fafc;
    --white: #ffffff;

    --text: #111827;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;

    --border: #e5e7eb;

    --green: #10b981;
    --green-light: #ecfdf5;

    --yellow: #f59e0b;
    --yellow-light: #fffbeb;

    --blue: #3b82f6;
    --blue-light: #eff6ff;

    --red: #ef4444;

    --shadow:
        0 8px 30px rgba(15, 23, 42, 0.05);

    --radius: 16px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
}


/* ================= SIDEBAR ================= */

.sidebar {
    width: 255px;
    height: 100vh;

    position: fixed;
    left: 0;
    top: 0;

    background: var(--white);
    border-right: 1px solid var(--border);

    display: flex;
    flex-direction: column;

    z-index: 100;
}

.brand {
    height: 85px;

    display: flex;
    align-items: center;

    padding: 0 24px;

    border-bottom: 1px solid #f1f5f9;
}

.logo {
    width: 43px;
    height: 43px;

    background: linear-gradient(
        135deg,
        #6366f1,
        #8b5cf6
    );

    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    font-size: 15px;
    font-weight: 800;

    box-shadow:
        0 7px 18px rgba(99, 102, 241, 0.25);
}

.brand-text {
    margin-left: 12px;
}

.brand-text h2 {
    font-size: 14px;
    font-weight: 800;
}

.brand-text span {
    color: var(--text-light);
    font-size: 10px;
}

.navigation {
    padding: 25px 15px;
}

.nav-title {
    font-size: 10px;
    font-weight: 700;

    color: var(--text-lighter);

    margin:
        0 12px
        12px;

    letter-spacing: 1px;
}

.settings-title {
    margin-top: 30px;
}

.nav-item {
    width: 100%;

    border: none;
    background: transparent;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 12px 14px;

    margin-bottom: 5px;

    border-radius: 10px;

    color: var(--text-light);

    font-family: inherit;

    font-size: 13px;
    font-weight: 500;

    cursor: pointer;

    transition: 0.2s;
}

.nav-item span {
    width: 20px;

    font-size: 18px;

    text-align: center;
}

.nav-item:hover {
    background: #f8fafc;
    color: var(--text);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 18px;
}

.creator-card {
    background: #f8fafc;

    border: 1px solid var(--border);

    padding: 12px;

    border-radius: 13px;

    display: flex;
    align-items: center;
}

.creator-logo {
    width: 34px;
    height: 34px;

    border-radius: 10px;

    background: white;

    border: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 11px;
    font-weight: 800;

    color: var(--primary);
}

.creator-card div:last-child {
    margin-left: 10px;
}

.creator-card strong {
    display: block;
    font-size: 12px;
}

.creator-card small {
    color: var(--text-light);
    font-size: 10px;
}


/* ================= MAIN ================= */

.main {
    margin-left: 255px;
    min-height: 100vh;
}


/* ================= TOPBAR ================= */

.topbar {
    height: 85px;

    background: rgba(255, 255, 255, 0.95);

    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;

    justify-content: flex-end;

    padding: 0 35px;

    position: sticky;
    top: 0;

    z-index: 50;

    backdrop-filter: blur(12px);
}

.topbar-right {
    display: flex;
    align-items: center;

    gap: 16px;
}

.search-box {
    width: 290px;
    height: 42px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: #f8fafc;

    display: flex;
    align-items: center;

    padding: 0 12px;

    color: var(--text-light);
}

.search-box > span {
    font-size: 20px;
}

.search-box input {
    flex: 1;

    border: none;
    outline: none;

    background: transparent;

    margin-left: 8px;

    font-family: inherit;

    font-size: 12px;
}

.search-box kbd {
    font-size: 9px;

    background: white;

    border: 1px solid var(--border);

    padding: 4px 7px;

    border-radius: 5px;

    color: var(--text-lighter);
}

.icon-button {
    width: 40px;
    height: 40px;

    border: 1px solid var(--border);

    background: white;

    border-radius: 10px;

    font-size: 18px;

    cursor: pointer;

    position: relative;
}

.notification-dot {
    width: 6px;
    height: 6px;

    background: var(--red);

    border-radius: 50%;

    position: absolute;
    top: 8px;
    right: 9px;
}

.profile {
    display: flex;
    align-items: center;

    gap: 9px;

    padding-left: 8px;

    cursor: pointer;
}

.profile-avatar {
    width: 38px;
    height: 38px;

    border-radius: 50%;

    background: var(--primary-light);

    color: var(--primary);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    font-weight: 700;
}

.profile-info strong {
    display: block;
    font-size: 12px;
}

.profile-info span {
    color: var(--text-light);
    font-size: 10px;
}

.profile-arrow {
    color: var(--text-light);
}

.mobile-menu,
.mobile-brand {
    display: none;
}


/* ================= CONTENT ================= */

.content {
    max-width: 1450px;

    margin: auto;

    padding: 40px;
}

.page-section {
    display: none;
}

.active-section {
    display: block;
}

.page-heading {
    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    margin-bottom: 32px;
}

.eyebrow {
    color: var(--primary);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.5px;

    margin-bottom: 8px;
}

.page-heading h1 {
    font-size: 30px;

    letter-spacing: -1px;

    margin-bottom: 7px;
}

.subtitle {
    color: var(--text-light);

    font-size: 13px;
}


/* ================= BUTTONS ================= */

.primary-btn {
    background: var(--primary);

    color: white;

    border: none;

    height: 43px;

    padding: 0 18px;

    border-radius: 10px;

    font-family: inherit;

    font-size: 12px;

    font-weight: 700;

    cursor: pointer;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    transition: 0.2s;
}

.primary-btn:hover {
    background: var(--primary-dark);

    transform: translateY(-1px);
}

.primary-btn span {
    font-size: 18px;
}


/* ================= STATS ================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 18px;

    margin-bottom: 40px;
}

.stat-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 20px;

    display: flex;
    align-items: center;

    gap: 15px;

    box-shadow: var(--shadow);
}

.stat-icon {
    width: 45px;
    height: 45px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 19px;

    font-weight: 700;
}

.stat-icon.purple {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-icon.yellow {
    background: var(--yellow-light);
    color: var(--yellow);
}

.stat-icon.blue {
    background: var(--blue-light);
    color: var(--blue);
}

.stat-icon.green {
    background: var(--green-light);
    color: var(--green);
}

.stat-card span {
    display: block;

    color: var(--text-light);

    font-size: 11px;

    margin-bottom: 5px;
}

.stat-card h2 {
    font-size: 23px;
}


/* ================= SECTION HEADER ================= */

.section-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 18px;
}

.section-header h2 {
    font-size: 18px;
}

.section-header p {
    color: var(--text-light);

    font-size: 11px;

    margin-top: 4px;
}

.view-all {
    border: none;

    background: transparent;

    color: var(--primary);

    font-family: inherit;

    font-weight: 700;

    font-size: 11px;

    cursor: pointer;
}


/* ================= FILTER ================= */

.category-filter {
    display: flex;

    gap: 8px;

    margin-bottom: 22px;

    overflow-x: auto;
}

.filter-btn {
    border: 1px solid var(--border);

    background: white;

    color: var(--text-light);

    padding: 8px 15px;

    border-radius: 8px;

    font-family: inherit;

    font-size: 11px;

    cursor: pointer;

    white-space: nowrap;

    transition: 0.2s;
}

.filter-btn:hover {
    border-color: #c7d2fe;

    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);

    color: white;

    border-color: var(--primary);
}


/* ================= PROMPT GRID ================= */

.prompt-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;
}

.prompt-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 20px;

    box-shadow: var(--shadow);

    transition:
        transform 0.2s,
        box-shadow 0.2s;

    position: relative;
}

.prompt-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 15px 35px rgba(15, 23, 42, 0.08);
}

.prompt-card-top {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    margin-bottom: 15px;
}

.prompt-category {
    display: inline-block;

    padding: 5px 9px;

    border-radius: 6px;

    background: var(--primary-light);

    color: var(--primary);

    font-size: 9px;

    font-weight: 700;
}

.favorite-btn {
    width: 30px;
    height: 30px;

    border: 1px solid var(--border);

    background: white;

    border-radius: 8px;

    color: #cbd5e1;

    cursor: pointer;

    font-size: 16px;

    transition: 0.2s;
}

.favorite-btn:hover {
    color: var(--yellow);
}

.favorite-btn.active {
    color: var(--yellow);

    background: var(--yellow-light);

    border-color: #fde68a;
}

.prompt-card h3 {
    font-size: 14px;

    margin-bottom: 9px;
}

.prompt-preview {
    color: var(--text-light);

    font-size: 11px;

    line-height: 1.7;

    min-height: 55px;

    display: -webkit-box;

    -webkit-line-clamp: 3;

    -webkit-box-orient: vertical;

    overflow: hidden;

    margin-bottom: 15px;
}

.prompt-tags {
    display: flex;

    gap: 5px;

    flex-wrap: wrap;

    margin-bottom: 18px;
}

.tag {
    font-size: 9px;

    background: #f8fafc;

    border: 1px solid var(--border);

    color: var(--text-light);

    padding: 4px 7px;

    border-radius: 5px;
}

.card-footer {
    border-top: 1px solid #f1f5f9;

    padding-top: 13px;

    display: flex;

    justify-content: space-between;

    align-items: center;
}

.card-date {
    font-size: 9px;

    color: var(--text-lighter);
}

.card-actions {
    display: flex;

    gap: 5px;
}

.card-action {
    border: none;

    background: transparent;

    color: var(--text-light);

    font-size: 11px;

    padding: 5px;

    cursor: pointer;

    border-radius: 5px;
}

.card-action:hover {
    background: #f8fafc;

    color: var(--primary);
}

.card-action.delete:hover {
    color: var(--red);

    background: #fef2f2;
}


/* ================= EMPTY STATE ================= */

.empty-state {
    grid-column: 1 / -1;

    background: white;

    border: 1px dashed #cbd5e1;

    border-radius: var(--radius);

    padding: 60px 20px;

    text-align: center;
}

.empty-icon {
    width: 55px;
    height: 55px;

    margin: 0 auto 15px;

    background: var(--primary-light);

    color: var(--primary);

    border-radius: 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 23px;
}

.empty-state h3 {
    font-size: 15px;

    margin-bottom: 6px;
}

.empty-state p {
    color: var(--text-light);

    font-size: 11px;
}


/* ================= CATEGORY CARDS ================= */

.category-cards {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;
}

.category-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 25px;

    cursor: pointer;

    transition: 0.2s;
}

.category-card:hover {
    border-color: #c7d2fe;

    transform: translateY(-2px);
}

.category-card-icon {
    width: 45px;
    height: 45px;

    background: var(--primary-light);

    color: var(--primary);

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;

    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 14px;

    margin-bottom: 5px;
}

.category-card p {
    color: var(--text-light);

    font-size: 10px;
}


/* ================= MODAL ================= */

.modal-overlay {
    position: fixed;

    inset: 0;

    background: rgba(15, 23, 42, 0.35);

    backdrop-filter: blur(4px);

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

    z-index: 500;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 570px;

    max-height: 90vh;

    overflow-y: auto;

    background: white;

    border-radius: 20px;

    padding: 28px;

    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.18);

    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    margin-bottom: 25px;
}

.modal-header h2 {
    font-size: 20px;
}

.close-btn {
    width: 34px;
    height: 34px;

    border: 1px solid var(--border);

    background: white;

    border-radius: 8px;

    font-size: 21px;

    color: var(--text-light);

    cursor: pointer;
}

.close-btn:hover {
    background: #f8fafc;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;

    font-size: 11px;

    font-weight: 700;

    margin-bottom: 7px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;

    border: 1px solid var(--border);

    background: #fbfdff;

    border-radius: 9px;

    padding: 11px 12px;

    outline: none;

    font-family: inherit;

    font-size: 11px;

    color: var(--text);

    transition: 0.2s;
}

.form-group textarea {
    resize: vertical;

    line-height: 1.6;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);

    background: white;

    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.08);
}

.form-group small {
    display: block;

    margin-top: 5px;

    color: var(--text-lighter);

    font-size: 9px;
}

.modal-actions {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    padding-top: 8px;
}

.cancel-btn,
.secondary-btn {
    height: 43px;

    padding: 0 17px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 10px;

    font-family: inherit;

    font-size: 11px;

    font-weight: 600;

    cursor: pointer;

    color: var(--text-light);
}

.cancel-btn:hover,
.secondary-btn:hover {
    background: #f8fafc;
}


/* ================= VIEW MODAL ================= */

.view-modal {
    width: 100%;

    max-width: 650px;

    background: white;

    border-radius: 20px;

    padding: 28px;

    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.18);
}

.view-category {
    display: inline-block;

    background: var(--primary-light);

    color: var(--primary);

    font-size: 9px;

    font-weight: 700;

    padding: 5px 9px;

    border-radius: 6px;

    margin-bottom: 8px;
}

.view-modal .modal-header h2 {
    margin-top: 2px;
}

.full-prompt {
    background: #f8fafc;

    border: 1px solid var(--border);

    border-radius: 12px;

    padding: 18px;

    font-size: 12px;

    line-height: 1.8;

    white-space: pre-wrap;

    max-height: 330px;

    overflow-y: auto;
}

.view-tags {
    display: flex;

    gap: 6px;

    flex-wrap: wrap;

    margin-top: 15px;
}

.view-actions {
    display: flex;

    justify-content: flex-end;

    gap: 9px;

    margin-top: 20px;
}


/* ================= TOAST ================= */

.toast {
    position: fixed;

    right: 25px;
    bottom: 25px;

    background: #111827;

    color: white;

    padding: 12px 17px;

    border-radius: 10px;

    display: flex;

    align-items: center;

    gap: 9px;

    font-size: 11px;

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.15);

    transform: translateY(100px);

    opacity: 0;

    transition: 0.3s;

    z-index: 1000;
}

.toast.show {
    transform: translateY(0);

    opacity: 1;
}

.toast-icon {
    width: 20px;
    height: 20px;

    border-radius: 50%;

    background: var(--green);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 10px;
}


/* ================= RESPONSIVE ================= */

@media (max-width: 1100px) {

    .stats-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .prompt-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .category-cards {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 800px) {

    .sidebar {
        transform: translateX(-100%);

        transition: 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
    }

    .topbar {
        justify-content: space-between;

        padding: 0 18px;
    }

    .mobile-menu {
        display: block;

        width: 38px;
        height: 38px;

        border: 1px solid var(--border);

        background: white;

        border-radius: 9px;

        cursor: pointer;

        font-size: 17px;
    }

    .mobile-brand {
        display: flex;

        align-items: center;

        gap: 8px;

        font-size: 11px;
    }

    .small-logo {
        width: 34px;
        height: 34px;

        font-size: 11px;
    }

    .profile-info,
    .profile-arrow {
        display: none;
    }

    .search-box {
        width: 200px;
    }

    .content {
        padding: 28px 20px;
    }

}


@media (max-width: 600px) {

    .topbar {
        height: 70px;
    }

    .mobile-brand strong {
        display: none;
    }

    .topbar-right {
        gap: 8px;
    }

    .search-box {
        width: 145px;
    }

    .search-box kbd {
        display: none;
    }

    .profile {
        padding: 0;
    }

    .page-heading {
        align-items: flex-start;

        flex-direction: column;

        gap: 18px;
    }

    .page-heading h1 {
        font-size: 25px;
    }

    .stats-grid {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 10px;
    }

    .stat-card {
        padding: 14px;

        gap: 10px;
    }

    .stat-icon {
        width: 38px;
        height: 38px;

        font-size: 15px;
    }

    .stat-card h2 {
        font-size: 19px;
    }

    .stat-card span {
        font-size: 9px;
    }

    .prompt-grid,
    .category-cards {
        grid-template-columns: 1fr;
    }

    .section-header {
        align-items: flex-start;
    }

    .modal {
        padding: 20px;

        border-radius: 16px;
    }

    .view-modal {
        padding: 20px;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions button,
    .view-actions button {
        width: 100%;
    }

    .view-actions {
        flex-direction: column;
    }

}