
/* =====================================
   FORCORA - COMPLETE RESPONSIVE CSS
===================================== */

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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f7fb;
    color: #172033;
    overflow-x: hidden;
}

.container {
    min-height: 100vh;
}

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

.sidebar {
    width: 255px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #10233d;
    color: white;
    padding: 28px 14px 22px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1001;
}

.logo {
    font-size: 27px;
    font-weight: 700;
    padding: 0 12px;
    margin-bottom: 32px;
}

.logo span {
    color: #6c63ff;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: 9px;
    color: #e8eef7;
    font-size: 16px;
    cursor: pointer;
}

.sidebar-menu li svg,
.bottom-item svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.sidebar-menu li.active {
    background-color: #244f82;
    color: white;
}

.sidebar-menu li:hover,
.bottom-item:hover {
    background-color: #1b3d65;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bottom-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    margin-bottom: 5px;
    border-radius: 9px;
    color: #e8eef7;
    font-size: 16px;
    cursor: pointer;
}

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

.main-content {
    margin-left: 255px;
    width: calc(100% - 255px);
    min-height: 100vh;
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* =====================================
   TOP BAR
===================================== */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 15px;
}

.search-box {
    min-width: 0;
}

.search-box input {
    width: 420px;
    max-width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e6ee;
    border-radius: 8px;
    outline: none;
    background-color: white;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.top-right select {
    padding: 10px 15px;
    border: 1px solid #e1e6ee;
    border-radius: 8px;
    background-color: white;
}

.profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #dce6f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #233f66;
    flex-shrink: 0;
}

/* =====================================
   DASHBOARD HEADING
===================================== */

.dashboard-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.dashboard-title {
    padding-top: 12px;
    flex: 1 1 250px;
    min-width: 0;
}

.dashboard-title h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.dashboard-title p {
    color: #667085;
    line-height: 1.4;
}

.dashboard-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex: 0 1 auto;
    min-width: 0;
}

/* =====================================
   ACTION CARDS
===================================== */

.action-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 285px));
    grid-template-areas:
        "upload single"
        "status status";
    gap: 10px 14px;
    align-items: start;
}

.action-card {
    width: 100%;
    min-width: 0;
    min-height: 92px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e2e6ec;
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: 0.2s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 35, 61, 0.08);
}

.upload-box {
    grid-area: upload;
    background-color: #f4f3ff;
    border-color: #dedcff;
}

.single-box {
    grid-area: single;
    background-color: #effbf3;
    border-color: #d9f1e1;
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.upload-action-icon {
    background-color: #e6e5ff;
    color: #5d55e8;
}

.single-action-icon {
    background-color: #dcf6e5;
    color: #17a85b;
}

.action-content h3 {
    font-size: 15px;
    font-weight: 700;
    color: #172033;
    margin-bottom: 4px;
}

.action-content p {
    font-size: 11px;
    line-height: 1.35;
    color: #667085;
}

.action-arrow {
    font-size: 21px;
    color: #3454d1;
}

#csvUploadStatus {
    grid-area: status;
    width: 100%;
    max-width: 100%;
    min-height: 20px;
    margin: 0;
    padding: 4px 0;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.analyze-btn {
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    background-color: #5b55e7;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.analyze-btn:hover {
    background-color: #4943d1;
}

/* =====================================
   SUMMARY CARDS
===================================== */

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.card {
    background-color: white;
    min-height: 105px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid #e4e8ef;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.total-icon {
    background-color: #eceaff;
    color: #6557e8;
}

.positive-icon,
.privacy-icon {
    background-color: #dcf7e7;
    color: #17a85b;
}

.bug-icon {
    background-color: #ffe5e7;
    color: #ef4c55;
}

.feature-icon {
    background-color: #fff3d5;
    color: #e6a400;
}

.card-content {
    width: 100%;
    min-width: 0;
}

.card-title {
    color: #172033;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 7px;
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.card-bottom h2 {
    font-size: 24px;
    font-weight: 700;
    color: #172033;
}

.trend-box {
    text-align: right;
    flex-shrink: 0;
}

.trend-box span {
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.trend-box small {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    color: #7c8798;
    white-space: nowrap;
}

.increase {
    color: #16a35a;
}

.decrease {
    color: #ef4c55;
}

/* =====================================
   CHARTS
===================================== */

.charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 25px;
}

.chart-box {
    background-color: white;
    min-height: 280px;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e4e8ef;
    min-width: 0;
}

.chart-box h3 {
    font-size: 18px;
}

/* =====================================
   SENTIMENT CHART
===================================== */

.sentiment-content,
.category-content {
    display: flex;
    align-items: center;
    justify-content: space-around;
    min-height: 220px;
    gap: 20px;
}

.donut-chart {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: conic-gradient(
        #20b76a 0% 58%,
        #ff4d4f 58% 83%,
        #f4b521 83% 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-donut {
    background: conic-gradient(
        #ef4c55 0% 25%,
        #7c5cf0 25% 42.2%,
        #20b76a 42.2% 100%
    );
}

.donut-center {
    width: 105px;
    height: 105px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-center h2 {
    font-size: 24px;
}

.donut-center p {
    font-size: 13px;
    color: #667085;
}

.sentiment-legend {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 170px;
}

.category-content .sentiment-legend {
    min-width: 205px;
}

.legend-item {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    align-items: center;
    gap: 10px;
}

.legend-item p,
.legend-item strong {
    font-size: 14px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.positive-dot {
    background-color: #20b76a;
}

.negative-dot,
.bug-dot,
.bug-bar {
    background-color: #ef4c55;
}

.neutral-dot {
    background-color: #f4b521;
}

.feature-dot,
.feature-bar {
    background-color: #7c5cf0;
}

.privacy-dot,
.privacy-bar {
    background-color: #20b76a;
}

/* =====================================
   CATEGORY BAR CHART
===================================== */

.bar-chart {
    height: 220px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 14px;
    padding: 20px 10px 0;
    border-bottom: 1px solid #dce3ec;
}

.bar-item {
    height: 100%;
    width: 70px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.category-bar-chart .bar-item {
    width: 105px;
}

.bar-value {
    font-size: 13px;
    font-weight: 700;
}

.bar {
    width: 50px;
    border-radius: 6px 6px 0 0;
}

.blue-bar {
    height: 150px;
    background-color: #3b82f6;
}

.purple-bar {
    height: 130px;
    background-color: #7c5cf0;
}

.yellow-bar {
    height: 100px;
    background-color: #f4b521;
}

.orange-bar {
    height: 85px;
    background-color: #ff8a3d;
}

.teal-bar {
    height: 60px;
    background-color: #18b8b2;
}

.category-bar-chart .bug-bar {
    height: 82px;
    border-radius: 6px 6px 0 0;
}

.category-bar-chart .feature-bar {
    height: 57px;
    border-radius: 6px 6px 0 0;
}

.category-bar-chart .privacy-bar {
    height: 150px;
    border-radius: 6px 6px 0 0;
}

.bar-item p {
    font-size: 12px;
    color: #49566a;
}

/* =====================================
   RECENT REVIEWS
===================================== */

.recent-reviews {
    background-color: white;
    margin-top: 25px;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e4e8ef;
    margin-bottom: 30px;
}

.recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.recent-header h3 {
    font-size: 18px;
}

.view-all-btn {
    border: none;
    background-color: transparent;
    color: #3454d1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.view-all-btn:hover {
    text-decoration: underline;
}

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

.recent-reviews th,
.recent-reviews td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e4e8ef;
}

.recent-reviews th {
    background-color: #f7f9fc;
    font-size: 13px;
}

.recent-reviews td {
    font-size: 14px;
}

/* =====================================
   BADGES
===================================== */

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.positive-badge {
    background-color: #dcf7e7;
    color: #159653;
}

.negative-badge,
.bug-badge {
    background-color: #ffe5e7;
    color: #e54850;
}

.neutral-badge {
    background-color: #fff2d2;
    color: #c98b00;
}

.ui-badge {
    background-color: #e5efff;
    color: #3476d8;
}

.feature-badge {
    background-color: #eee9ff;
    color: #6954d8;
}

.praise-badge,
.privacy-badge {
    background-color: #e8f7ec;
    color: #1d9b55;
}

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

@media (max-width: 1200px) {

    .dashboard-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-actions {
        align-items: flex-start;
        width: 100%;
    }

    .action-cards {
        width: 100%;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .charts {
        grid-template-columns: 1fr;
    }
}

/* =====================================
   MOBILE HAMBURGER SIDEBAR
===================================== */

.hamburger-btn,
.sidebar-close,
.sidebar-overlay {
    display: none;
}

@media (max-width: 700px) {

    body {
        overflow-x: hidden;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        height: auto;
        min-height: 100vh;
        padding: 16px;
    }

    .sidebar {
        width: 255px;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 12px;
        right: 14px;
        width: 34px;
        height: 34px;
        border: none;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.12);
        color: white;
        font-size: 26px;
        cursor: pointer;
        z-index: 2;
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        z-index: 1000;
        transition: opacity 0.3s ease,
                    visibility 0.3s ease;
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        flex-shrink: 0;
        border: 1px solid #e1e6ee;
        border-radius: 8px;
        background: white;
        color: #10233d;
        font-size: 23px;
        cursor: pointer;
    }

    .hamburger-btn:hover {
        background: #f0f3f8;
    }

    .topbar {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 24px;
    }

    .search-box {
        flex: 1;
        min-width: 0;
    }

    .search-box input {
        width: 100%;
        min-width: 0;
        padding: 12px;
    }

    .top-right {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

    .profile {
        gap: 8px;
    }

    .dashboard-heading {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .dashboard-title {
        padding-top: 0;
    }

    .dashboard-title h1 {
        font-size: 27px;
    }

    .dashboard-actions {
        width: 100%;
        align-items: stretch;
    }

    .action-cards {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "upload"
            "single"
            "status";
    }

    .action-card,
    .analyze-btn {
        width: 100%;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .card {
        padding: 13px;
        gap: 10px;
    }

    .card-icon {
        width: 40px;
        height: 40px;
    }

    .card-icon svg {
        width: 21px;
        height: 21px;
    }

    .card-title {
        font-size: 12px;
    }

    .card-bottom h2 {
        font-size: 21px;
    }

    .trend-box small {
        white-space: normal;
        font-size: 9px;
    }

    .charts {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }

    .chart-box {
        width: 100%;
        min-width: 0;
        padding: 16px;
    }

    .category-content {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .category-content .sentiment-legend {
        width: 100%;
        min-width: 0;
    }

    .donut-chart {
        width: 150px;
        height: 150px;
    }

    .donut-center {
        width: 95px;
        height: 95px;
    }

    .category-bar-chart .bar-item {
        width: 30%;
        min-width: 0;
    }

    .category-bar-chart .bar {
        max-width: 40px;
    }

    .category-bar-chart .bar-item p {
        font-size: 10px;
    }

    .recent-reviews {
        width: 100%;
        overflow-x: auto;
    }

    .recent-reviews table {
        min-width: 650px;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

/* =====================================
   SMALL MOBILE SCREENS
===================================== */

@media (max-width: 400px) {

    .main-content {
        padding: 12px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .dashboard-title h1 {
        font-size: 24px;
    }

    .top-right select {
        padding: 9px;
        font-size: 12px;
    }

    .profile span {
        font-size: 12px;
    }

    .card {
        min-height: 90px;
    }
}
