/* =====================================================
   RESET
===================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background: #f5f7fb;
    color: #172033;
}

button,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}


/* =====================================================
   APP
===================================================== */

.app {
    display: flex;
    min-height: 100vh;
}


/* =====================================================
   SIDEBAR
===================================================== */

.sidebar {
    width: 250px;
    min-height: 100vh;

    background:
        linear-gradient(
            180deg,
            #111827 0%,
            #0f172a 100%
        );

    color: white;

    display: flex;
    flex-direction: column;

    padding: 25px 17px;

    position: fixed;

    left: 0;
    top: 0;
    bottom: 0;

    border-right: 1px solid #1f2937;

    z-index: 10;
}


/* =====================================================
   BRAND
===================================================== */

.brand {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 8px 10px 30px;

    cursor: default;
}

.brand-icon {
    width: 43px;
    height: 43px;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #6366f1,
            #4f46e5
        );

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 21px;

    box-shadow:
        0 8px 20px rgba(79, 70, 229, 0.3);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.brand:hover .brand-icon {
    transform:
        translateY(-2px)
        rotate(-3deg)
        scale(1.04);

    box-shadow:
        0 12px 28px rgba(79, 70, 229, 0.42);
}

.brand h2 {
    font-size: 17px;

    font-weight: 700;

    letter-spacing: -0.3px;
}

.brand span {
    display: block;

    margin-top: 3px;

    color: #9ca3af;

    font-size: 11px;
}


/* =====================================================
   SIDEBAR SECTION
===================================================== */

.sidebar-section {
    margin-top: 10px;
}

.sidebar-label {
    padding: 0 12px 10px;

    color: #6b7280;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1.2px;
}


/* =====================================================
   SIDEBAR BUTTON
===================================================== */

.sidebar-button {
    width: 100%;

    border: none;

    background: transparent;

    color: #9ca3af;

    padding: 13px;

    margin-bottom: 5px;

    border-radius: 10px;

    display: flex;

    align-items: center;

    gap: 11px;

    text-align: left;

    font-size: 13px;

    position: relative;

    overflow: hidden;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.sidebar-button::after {
    content: "";

    position: absolute;

    left: 0;

    top: 50%;

    width: 3px;

    height: 0;

    background: #818cf8;

    border-radius: 0 4px 4px 0;

    transform: translateY(-50%);

    transition: height 0.2s ease;
}

.sidebar-button:hover {
    background: #1f2937;

    color: white;

    transform: translateX(2px);
}

.sidebar-button:hover::after,
.sidebar-button.active::after {
    height: 55%;
}

.sidebar-button.active {
    background:
        linear-gradient(
            135deg,
            #312e81,
            #3730a3
        );

    color: white;

    box-shadow:
        0 7px 18px rgba(49, 46, 129, 0.25);
}

.sidebar-button-icon {
    width: 25px;

    font-size: 16px;

    text-align: center;
}


/* =====================================================
   RECENT HISTORY
===================================================== */

.recent-history {
    margin-top: 28px;

    padding: 0 3px;
}

.recent-history-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 9px;

    margin-bottom: 10px;
}

.recent-history-header > div {
    display: flex;

    align-items: center;

    gap: 7px;
}

.recent-history-title {
    color: #6b7280;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.2px;
}

.history-count {
    min-width: 17px;

    height: 17px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #1f2937;

    color: #818cf8;

    border-radius: 5px;

    font-size: 8px;

    font-weight: 800;
}


/* =====================================================
   CLEAR HISTORY
===================================================== */

.clear-history {
    border: none;

    background: transparent;

    color: #6b7280;

    font-size: 9px;

    font-weight: 600;

    padding: 4px 6px;

    border-radius: 5px;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.clear-history:hover {
    color: #f87171;

    background: rgba(248, 113, 113, 0.08);
}


/* =====================================================
   HISTORY LIST
===================================================== */

.recent-history-list {
    display: flex;

    flex-direction: column;

    gap: 5px;

    max-height: 310px;

    overflow-y: auto;

    padding-right: 2px;
}

.recent-history-list::-webkit-scrollbar {
    width: 3px;
}

.recent-history-list::-webkit-scrollbar-track {
    background: transparent;
}

.recent-history-list::-webkit-scrollbar-thumb {
    background: #374151;

    border-radius: 10px;
}


/* =====================================================
   HISTORY ITEM
===================================================== */

.history-item {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 9px;

    border: 1px solid transparent;

    background: transparent;

    color: #d1d5db;

    padding: 9px 8px;

    border-radius: 9px;

    text-align: left;

    position: relative;

    overflow: hidden;

    transition:
        background 0.2s ease,
        border 0.2s ease,
        transform 0.2s ease;
}

.history-item::before {
    content: "";

    position: absolute;

    left: 0;

    top: 8px;

    bottom: 8px;

    width: 2px;

    background: #6366f1;

    border-radius: 4px;

    opacity: 0;

    transform: scaleY(0.5);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.history-item:hover {
    background: #1a2233;

    border-color: #273244;

    transform: translateX(2px);

    color: white;
}

.history-item:hover::before {
    opacity: 1;

    transform: scaleY(1);
}

.history-item.active {
    background:
        linear-gradient(
            135deg,
            #1e1b4b,
            #1f2937
        );

    border-color: #3730a3;

    color: white;

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.12);
}

.history-item.active::before {
    opacity: 1;

    transform: scaleY(1);
}


/* =====================================================
   HISTORY NUMBER
===================================================== */

.history-item-number {
    width: 25px;

    height: 25px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 7px;

    background: #1f2937;

    color: #6b7280;

    font-size: 8px;

    font-weight: 800;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.history-item:hover .history-item-number {
    background: #312e81;

    color: #c7d2fe;
}

.history-item.active .history-item-number {
    background: #4f46e5;

    color: white;

    box-shadow:
        0 4px 10px rgba(79, 70, 229, 0.3);
}


/* =====================================================
   HISTORY CONTENT
===================================================== */

.history-item-content {
    min-width: 0;

    flex: 1;

    display: flex;

    flex-direction: column;

    gap: 3px;
}

.history-item-text {
    display: block;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    color: #d1d5db;

    font-size: 10px;

    line-height: 1.4;
}

.history-item:hover .history-item-text {
    color: white;
}

.history-item.active .history-item-text {
    color: white;
}

.history-item-label {
    display: block;

    color: #6b7280;

    font-size: 7px;

    text-transform: uppercase;

    letter-spacing: 0.5px;
}

.history-item.active .history-item-label {
    color: #818cf8;
}


/* =====================================================
   HISTORY ARROW
===================================================== */

.history-item-arrow {
    flex-shrink: 0;

    color: #4b5563;

    font-size: 12px;

    opacity: 0;

    transform: translateX(-4px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.history-item:hover .history-item-arrow,
.history-item.active .history-item-arrow {
    opacity: 1;

    transform: translateX(0);

    color: #818cf8;
}


/* =====================================================
   EMPTY HISTORY
===================================================== */

.history-empty {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 12px 9px;

    border-radius: 9px;

    background: #151d2b;

    border: 1px dashed #273244;
}

.history-empty-icon {
    width: 28px;

    height: 28px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 7px;

    background: #1f2937;

    font-size: 12px;
}

.history-empty strong {
    display: block;

    color: #9ca3af;

    font-size: 9px;
}

.history-empty span {
    display: block;

    margin-top: 2px;

    color: #4b5563;

    font-size: 8px;

    line-height: 1.3;
}


/* =====================================================
   SIDEBAR BOTTOM
===================================================== */

.sidebar-bottom {
    margin-top: auto;
}

.system-status {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 13px;

    border-radius: 10px;

    background: #182131;

    border: 1px solid #273244;

    transition:
        border-color 0.2s ease,
        transform 0.2s ease;
}

.system-status:hover {
    border-color: #374151;

    transform: translateY(-1px);
}

.status-dot {
    width: 8px;

    height: 8px;

    background: #22c55e;

    border-radius: 50%;

    box-shadow:
        0 0 0 4px rgba(34, 197, 94, 0.1);
}

.system-status strong {
    display: block;

    color: #e5e7eb;

    font-size: 11px;
}

.system-status small {
    display: block;

    margin-top: 3px;

    color: #6b7280;

    font-size: 10px;
}

.sidebar-footer {
    padding: 18px 5px 2px;

    text-align: center;

    color: #4b5563;

    font-size: 9px;
}


/* =====================================================
   MAIN CONTENT
===================================================== */

.main-content {
    width: calc(100% - 250px);

    margin-left: 250px;

    min-height: 100vh;

    padding: 34px 45px 25px;
}


/* =====================================================
   TOPBAR
===================================================== */

.topbar {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 30px;
}

.topbar-label {
    color: #6366f1;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.5px;

    margin-bottom: 6px;
}

.topbar h1 {
    font-size: 29px;

    color: #111827;

    letter-spacing: -0.8px;
}

.topbar-badge {
    display: flex;

    align-items: center;

    gap: 7px;

    padding: 8px 13px;

    background: #eef2ff;

    color: #4338ca;

    border-radius: 20px;

    font-size: 11px;

    font-weight: 700;
}

.topbar-badge span {
    color: #22c55e;

    font-size: 9px;
}


/* =====================================================
   WELCOME CARD
===================================================== */

.welcome-card {
    display: flex;

    align-items: center;

    gap: 18px;

    padding: 24px 27px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f8f8ff
        );

    border: 1px solid #e5e7eb;

    border-radius: 16px;

    margin-bottom: 20px;

    box-shadow:
        0 6px 25px rgba(15, 23, 42, 0.04);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.welcome-card:hover {
    transform: translateY(-2px);

    border-color: #ddd6fe;

    box-shadow:
        0 12px 30px rgba(79, 70, 229, 0.07);
}

.welcome-icon {
    width: 48px;

    height: 48px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #eef2ff;

    border-radius: 13px;

    font-size: 22px;

    transition:
        transform 0.25s ease;
}

.welcome-card:hover .welcome-icon {
    transform:
        rotate(-4deg)
        scale(1.06);
}

.welcome-card h2 {
    font-size: 18px;

    color: #111827;

    margin-bottom: 5px;
}

.welcome-card p {
    max-width: 750px;

    color: #6b7280;

    font-size: 12px;

    line-height: 1.6;
}


/* =====================================================
   QUESTION CARD
===================================================== */

.question-card {
    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 16px;

    padding: 25px;

    box-shadow:
        0 6px 25px rgba(15, 23, 42, 0.04);

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.question-card:hover {
    border-color: #dfe3f5;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.055);
}

.question-card:focus-within {
    border-color: #c7d2fe;

    box-shadow:
        0 8px 30px rgba(79, 70, 229, 0.08);
}


/* =====================================================
   CARD HEADING
===================================================== */

.card-heading > div {
    display: flex;

    align-items: center;

    gap: 12px;
}

.section-number {
    width: 31px;

    height: 31px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #eef2ff;

    color: #4f46e5;

    border-radius: 9px;

    font-size: 10px;

    font-weight: 800;
}

.card-heading h3 {
    color: #111827;

    font-size: 15px;
}

.card-heading p {
    margin-top: 3px;

    color: #9ca3af;

    font-size: 11px;
}


/* =====================================================
   TEXTAREA
===================================================== */

.textarea-wrapper {
    position: relative;
}

textarea {
    width: 100%;

    min-height: 115px;

    margin-top: 20px;

    padding: 17px;

    resize: vertical;

    border: 1px solid #dfe3ea;

    border-radius: 11px;

    outline: none;

    background: #fafbfc;

    color: #1f2937;

    font-size: 13px;

    line-height: 1.6;

    position: relative;

    z-index: 2;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

textarea::placeholder {
    color: #a0a7b2;
}

textarea:focus {
    background: white;

    border-color: #6366f1;

    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.08);
}

.history-selected {
    border-color: #6366f1 !important;

    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.10),
        0 8px 25px rgba(79, 70, 229, 0.08) !important;
}


/* =====================================================
   SUGGESTIONS
===================================================== */

.suggestion-area {
    margin-top: 14px;
}

.suggestion-label {
    display: block;

    color: #9ca3af;

    font-size: 10px;

    margin-bottom: 7px;
}

.suggestions {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 7px;
}

.suggestions button {
    border: 1px solid #e5e7eb;

    background: white;

    color: #6b7280;

    border-radius: 8px;

    padding: 7px 10px;

    font-size: 10px;

    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.suggestions button:hover {
    border-color: #c7d2fe;

    color: #4f46e5;

    background: #f5f3ff;

    transform: translateY(-2px);

    box-shadow:
        0 5px 12px rgba(79, 70, 229, 0.08);
}

.suggestions button:active {
    transform: translateY(0);
}


/* =====================================================
   QUESTION BOTTOM
===================================================== */

.question-bottom {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-top: 15px;
}

.enter-hint {
    color: #b0b6c0;

    font-size: 10px;
}


/* =====================================================
   ANALYZE BUTTON
===================================================== */

.analyze-button {
    min-width: 115px;

    border: none;

    background:
        linear-gradient(
            135deg,
            #6366f1,
            #4f46e5
        );

    color: white;

    border-radius: 9px;

    padding: 11px 16px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 12px;

    font-size: 12px;

    font-weight: 700;

    box-shadow:
        0 7px 16px rgba(79, 70, 229, 0.22);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.analyze-button:hover {
    background:
        linear-gradient(
            135deg,
            #4f46e5,
            #4338ca
        );

    transform: translateY(-2px);

    box-shadow:
        0 10px 22px rgba(79, 70, 229, 0.3);
}

.analyze-button:active {
    transform: translateY(0);
}

.analyze-button:disabled {
    opacity: 0.7;

    cursor: not-allowed;

    transform: none;
}

.analyze-arrow {
    transition:
        transform 0.2s ease;
}

.analyze-button:hover .analyze-arrow {
    transform: translateX(3px);
}


/* =====================================================
   LOADING
===================================================== */

.loading {
    display: flex;

    align-items: center;

    gap: 14px;

    margin-top: 18px;

    padding: 17px 20px;

    background: #eef2ff;

    border: 1px solid #e0e7ff;

    border-radius: 12px;

    animation: fadeUp 0.3s ease;
}

.loading strong {
    display: block;

    color: #3730a3;

    font-size: 12px;
}

.loading span {
    display: block;

    margin-top: 3px;

    color: #6366f1;

    font-size: 10px;
}

.loader {
    width: 22px;

    height: 22px;

    flex-shrink: 0;

    border: 3px solid #c7d2fe;

    border-top-color: #4f46e5;

    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}


/* =====================================================
   CONVERSATION
===================================================== */

.conversation-question {
    display: flex;

    align-items: flex-start;

    gap: 11px;

    padding: 4px 3px 2px;

    animation: fadeUp 0.35s ease;
}

.conversation-avatar {
    width: 31px;

    height: 31px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 9px;

    font-size: 9px;

    font-weight: 700;
}

.user-avatar {
    background: #111827;

    color: white;
}

.conversation-message {
    padding-top: 2px;
}

.message-label {
    display: block;

    color: #9ca3af;

    font-size: 9px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.7px;

    margin-bottom: 4px;
}

.conversation-message p {
    color: #374151;

    font-size: 12px;

    line-height: 1.6;

    background: white;

    border: 1px solid #e5e7eb;

    padding: 10px 13px;

    border-radius: 4px 10px 10px 10px;

    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.025);
}


/* =====================================================
   RESULTS
===================================================== */

.result-area {
    margin-top: 20px;

    display: flex;

    flex-direction: column;

    gap: 16px;

    animation: fadeUp 0.35s ease;
}

.result-card {
    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 15px;

    padding: 22px;

    box-shadow:
        0 6px 25px rgba(15, 23, 42, 0.035);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.result-card:hover {
    border-color: #e0e4ef;

    box-shadow:
        0 10px 28px rgba(15, 23, 42, 0.05);
}

.result-card-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 17px;
}

.result-title {
    display: flex;

    align-items: center;

    gap: 11px;
}

.result-icon {
    width: 35px;

    height: 35px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #f1f5f9;

    border-radius: 9px;

    font-size: 15px;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.result-card:hover .result-icon {
    transform: scale(1.05);

    background: #eef2ff;
}

.result-title h3 {
    color: #111827;

    font-size: 13px;
}

.result-title p {
    color: #9ca3af;

    font-size: 10px;

    margin-top: 3px;
}


/* =====================================================
   AI BADGE
===================================================== */

.ai-response-badge {
    padding: 5px 9px;

    background: #eef2ff;

    color: #4f46e5;

    border-radius: 20px;

    font-size: 9px;

    font-weight: 700;
}


/* =====================================================
   AI INSIGHT
===================================================== */

.insight-card {
    border-left: 3px solid #6366f1;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #fafaff
        );
}

.explanation {
    color: #4b5563;

    font-size: 13px;

    line-height: 1.75;

    background: #f8f9fc;

    padding: 15px;

    border-radius: 9px;

    animation: resultAppear 0.5s ease;
}


/* =====================================================
   RESULT COUNT
===================================================== */

.result-count {
    color: #9ca3af;

    font-size: 9px;

    font-weight: 600;
}


/* =====================================================
   SQL
===================================================== */

.sql-card {
    padding: 0;

    overflow: hidden;
}

.sql-toggle {
    width: 100%;

    border: none;

    background: white;

    padding: 19px 22px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    text-align: left;

    color: #111827;

    transition:
        background 0.2s ease;
}

.sql-toggle:hover {
    background: #fafbff;
}

.sql-toggle > span {
    color: #9ca3af;

    font-size: 11px;

    transition:
        transform 0.2s ease;
}

.sql-icon {
    background: #111827;

    color: white;

    font-family: monospace;

    font-size: 11px;
}

.sql-content {
    padding: 0 22px 20px;
}

.sql-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 8px;

    color: #9ca3af;

    font-size: 9px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.7px;
}

.sql-header button {
    border: 1px solid #e5e7eb;

    background: white;

    color: #6b7280;

    padding: 5px 9px;

    border-radius: 6px;

    font-size: 9px;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.sql-header button:hover {
    color: #4f46e5;

    border-color: #c7d2fe;

    background: #f5f3ff;
}

pre {
    background: #111827;

    color: #d1d5db;

    padding: 17px;

    border-radius: 10px;

    overflow-x: auto;

    white-space: pre-wrap;

    word-break: break-word;

    font-family:
        "Consolas",
        "Courier New",
        monospace;

    font-size: 11px;

    line-height: 1.65;
}


/* =====================================================
   TABLE
===================================================== */

.table-container {
    width: 100%;

    overflow-x: auto;

    border: 1px solid #edf0f4;

    border-radius: 10px;
}

table {
    width: 100%;

    border-collapse: collapse;

    min-width: 500px;
}

th {
    background: #f8fafc;

    color: #64748b;

    font-size: 10px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    text-align: left;

    padding: 12px 14px;

    border-bottom: 1px solid #e5e7eb;
}

td {
    color: #374151;

    font-size: 11px;

    padding: 12px 14px;

    border-bottom: 1px solid #f1f3f5;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition:
        background 0.2s ease;
}

tbody tr:hover {
    background: #fafbff;
}


/* =====================================================
   NEW QUESTION
===================================================== */

.new-question-button {
    align-self: center;

    border: 1px solid #e0e7ff;

    background: white;

    color: #4f46e5;

    border-radius: 9px;

    padding: 9px 14px;

    font-size: 10px;

    font-weight: 700;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.new-question-button:hover {
    background: #eef2ff;

    transform: translateY(-2px);

    box-shadow:
        0 5px 14px rgba(79, 70, 229, 0.08);
}


/* =====================================================
   PREDICTION
===================================================== */

.model-badge {
    padding: 6px 9px;

    background: #ecfdf5;

    color: #047857;

    border-radius: 7px;

    font-size: 9px;

    font-weight: 700;
}

.prediction-welcome {
    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f0fdf9
        );
}


/* =====================================================
   FOOTER
===================================================== */

.main-footer {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 25px 3px 5px;

    color: #9ca3af;

    font-size: 9px;
}


/* =====================================================
   ERROR
===================================================== */

.input-error {
    border-color: #ef4444 !important;

    box-shadow:
        0 0 0 3px rgba(239, 68, 68, 0.08) !important;
}

.empty-result {
    padding: 25px;

    text-align: center;

    color: #9ca3af;

    font-size: 11px;
}

.error-card {
    display: flex;

    align-items: flex-start;

    gap: 14px;

    padding: 20px;

    background: #fff7f7;

    border: 1px solid #fecaca;

    border-radius: 12px;

    animation: fadeUp 0.3s ease;
}

.error-icon {
    width: 35px;

    height: 35px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #fee2e2;

    border-radius: 9px;
}

.error-card h3 {
    color: #991b1b;

    font-size: 13px;

    margin-bottom: 5px;
}

.error-card p {
    color: #b91c1c;

    font-size: 11px;

    line-height: 1.5;

    margin-bottom: 12px;
}


/* =====================================================
   ANIMATIONS
===================================================== */

@keyframes spin {

    to {
        transform: rotate(360deg);
    }

}

@keyframes fadeUp {

    from {
        opacity: 0;

        transform: translateY(8px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }

}

@keyframes resultAppear {

    from {
        opacity: 0;

        transform: scale(0.98);
    }

    to {
        opacity: 1;

        transform: scale(1);
    }

}


/* =====================================================
   HIDDEN
===================================================== */

.hidden {
    display: none !important;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 950px) {

    .sidebar {
        width: 210px;
    }

    .main-content {
        width: calc(100% - 210px);

        margin-left: 210px;

        padding: 30px;
    }

}


@media (max-width: 750px) {

    .sidebar {
        position: relative;

        width: 100%;

        min-height: auto;

        padding: 15px;

        flex-direction: row;

        align-items: center;

        gap: 15px;
    }

    .app {
        flex-direction: column;
    }

    .brand {
        padding: 0;

        flex: 1;
    }

    .brand span {
        display: none;
    }

    .sidebar-section {
        display: flex;

        margin: 0;

        gap: 5px;
    }

    .sidebar-label {
        display: none;
    }

    .sidebar-button {
        width: auto;

        margin: 0;

        padding: 9px 11px;
    }

    .sidebar-bottom {
        display: none;
    }

    .recent-history {
        display: none;
    }

    .main-content {
        width: 100%;

        margin-left: 0;

        padding: 25px 18px;
    }

}


@media (max-width: 560px) {

    .topbar {
        align-items: flex-start;

        gap: 10px;
    }

    .topbar h1 {
        font-size: 24px;
    }

    .topbar-badge {
        display: none;
    }

    .welcome-card {
        align-items: flex-start;

        padding: 20px;
    }

    .question-card {
        padding: 18px;
    }

    .question-bottom {
        flex-direction: column;

        align-items: stretch;
    }

    .analyze-button {
        width: 100%;
    }

    .suggestions {
        width: 100%;
    }

    .result-card {
        padding: 17px;
    }

    .ai-response-badge {
        display: none;
    }

    .main-footer {
        flex-direction: column;

        gap: 6px;

        align-items: flex-start;
    }

}


/* =====================================================
   ACCESSIBILITY
===================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;

    }

}