* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    background: #f6f8ff;
    color: #333;
}


/* ================= HEADER ================= */

.header {
    background: #0b1033;
    color: white;

    min-height: 90px;
    padding: 15px 5%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.logo h1 {
    font-size: 30px;
    font-weight: 700;
}

.logo h1 span {
    color: #ffb400;
}

.logo p {
    font-size: 11px;
    opacity: 0.8;
}


/* ================= HEADER RIGHT ================= */

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.top-links {
    display: flex;
    gap: 18px;
}

.top-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.top-links a:hover {
    color: #ffb400;
}


.search-box{
    display:flex;
}

.search-box input{
    width:260px;
    padding:12px;
    border:none;
    outline:none;
    border-radius:10px 0 0 10px;
}

.search-box button{
    padding:12px 25px;
    border:none;
    cursor:pointer;
    color:#fff;
    font-weight:600;
    border-radius:0 10px 10px 0;
    background:linear-gradient(135deg,#6d45ff,#ff4f7b,#ff8b3d);
}



/* ================= NAVBAR ================= */

.navbar {
    background: #16215f;
}

.nav-container {
    min-height: 55px;

    padding: 0 5%;

    display: flex;
    align-items: center;

    gap: 25px;
}

.nav-container a {
    color: white;
    text-decoration: none;

    font-size: 14px;

    padding: 18px 0;
}

.nav-container a:hover,
.nav-container a.active {
    color: #ffb400;
}

.add-problem-btn {
    margin-left: auto;

    border: none;

    padding: 10px 18px;

     background:linear-gradient(135deg,#6d45ff,#ff4f7b,#ff8b3d);
     color:#fff !important;

    border-radius: 6px;

    font-weight: 600;

    cursor: pointer;
}


/* ================= PAGE ================= */

.solution-page {
    width: 90%;
    max-width: 1400px;
    margin: 35px auto;
    box-sizing: border-box;
}


/* ================= HEADING ================= */

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 25px;
}

.page-heading h2 {
    font-size: 30px;
    color: #0b1033;
}

.page-heading p {
    margin-top: 5px;
    color: #777;
    font-size: 14px;
}


.primary-btn {
    border: none;

    background: linear-gradient(
        135deg,
        #6d45ff,
        #ff4f7b,
        #ff8b3d
    );

    color: white;

    padding: 12px 22px;

    border-radius: 7px;

    font-weight: 600;

    cursor: pointer;
}


/* ================= FILTER ================= */

.filters {
    background: white;

    padding: 18px;

    border-radius: 10px;

    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);

    display: flex;
    gap: 15px;

    margin-bottom: 30px;
    box-sizing: border-box;
}

.filters input,
.filters select {
    height: 44px;

    padding: 0 14px;

    border: 1px solid #ddd;

    border-radius: 6px;

    outline: none;

    font-family: inherit;
    box-sizing: border-box;
}

.filters input {
    flex: 1;
}

.filters input:focus,
.filters select:focus {
    border-color: #ffb400;
}


/* ================= GRID ================= */

.solution-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
}

/* ================= CARD ================= */

.solution-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 26px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(11, 16, 51, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    width: 100%;
}

.solution-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(11, 16, 51, 0.12);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.solution-card h3 {
    color: #0b1033;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 700;
    flex: 1;
    min-width: 0;
    margin: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    text-transform: capitalize;
}

.status-submitted {
    background: #e9eefc;
    color: #1e3a8a;
    border: 1px solid #c7d2fe;
}

.status-review {
    background: #fef3c7;
    color: #854d0e;
    border: 1px solid #fde68a;
}

.status-supported {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-approved {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-project {
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #ddd6fe;
}

/* ================= CARD CONTENT ================= */

.problem-reference {
    margin-top: 0;
    margin-bottom: 16px;
    background: #f1f5fb;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.problem-reference strong {
    display: block;
    color: #0b1033;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.problem-reference p {
    margin: 0;
    color: #0b1033;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.solution-description {
    margin-top: 0;
    margin-bottom: 18px;
    color: #333333;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.card-info {
    margin-top: auto;
    margin-bottom: 16px;
    padding: 16px 0;
    border-top: 1px solid #e8edf5;
    border-bottom: 1px solid #e8edf5;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    box-sizing: border-box;
}

.info-item {
    min-width: 0;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.info-item strong {
    display: block;
    color: #0b1033;
    font-size: 15px;
    font-weight: 700;
    margin-top: 4px;
    text-transform: none;
    letter-spacing: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ================= CARD BOTTOM ================= */

.card-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

.support-info {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 20px;
}

.support-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.view-btn,
.support-btn,
.project-btn,
.edit-btn,
.delete-btn {
    border: none;
    height: 38px;
    padding: 0 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.view-btn {
    background: #e0e7ff;
    color: #1e40af;
    border: 1px solid #c7d2fe;
}

.view-btn:hover {
    background: #c7d2fe;
    color: #1e3a8a;
}

.edit-btn {
    background: #2563eb !important;
    color: #ffffff !important;
}

.edit-btn:hover {
    background: #1d4ed8 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.delete-btn {
    background: #dc2626 !important;
    color: #ffffff !important;
}

.delete-btn:hover {
    background: #b91c1c !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.support-btn {
    background: #16a34a !important;
    color: #ffffff !important;
}

.support-btn:hover {
    background: #15803d !important;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35);
}

.project-btn {
    width: 100%;
    height: 44px;
    margin-top: 4px;
    background: #0b1033 !important;
    color: #ffffff !important;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(11, 16, 51, 0.18);
}

.project-btn:hover {
    background: #16215f !important;
    box-shadow: 0 6px 20px rgba(11, 16, 51, 0.28);
    transform: translateY(-1px);
}


/* ================= MODAL ================= */

.modal {
    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.6);

    z-index: 999;

    padding: 30px 15px;

    overflow-y: auto;
}

.modal.show {
    display: flex;

    align-items: flex-start;

    justify-content: center;
}

.modal-content {
    width: 100%;
    max-width: 750px;

    background: white;

    border-radius: 12px;

    padding: 25px;

    margin-top: 20px;
}

.details-content {
    max-width: 850px;
}


.modal-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 20px;
}

.modal-header h2 {
    color: #0b1033;
}

.close-btn {
    border: none;

    background: transparent;

    font-size: 28px;

    cursor: pointer;

    color: #555;
}


/* ================= FORM ================= */

.form-group {
    margin-bottom: 27px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    font-size: 17px;

    font-weight: 600;

    color: #100f0f;
}

.form-group label span {
    color: red;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;

    border: 1px solid #ddd;

    border-radius: 6px;

    padding: 11px 13px;

    font-family: inherit;

    font-size: 13px;

    outline: none;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #ffb400;
}

.form-row {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 15px;
}


/* ================= MODAL ACTIONS ================= */

.modal-actions {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 25px;
}

.cancel-btn,
.submit-btn {
    padding: 11px 20px;

    border-radius: 6px;

    border: none;

    cursor: pointer;

    font-family: inherit;

    font-weight: 600;
}

.cancel-btn {
    background: #eee;

    color: #444;
}

.submit-btn {
    background: #ffb400;

    color: #0b1033;
}


/* ================= DETAILS ================= */

.details-section {
    margin-bottom: 22px;
}

.details-section h4 {
    color: #0b1033;

    margin-bottom: 8px;
}

.details-section p {
    color: #666;

    font-size: 14px;

    line-height: 1.7;
}

.detail-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 15px;
}

.detail-box {
    background: #f4f7fc;

    padding: 14px;

    border-radius: 7px;
}

.detail-box small {
    color: #777;

    display: block;

    margin-bottom: 3px;
}

.detail-box strong {
    color: #222;
}


/* ================= LOADING ================= */

.loading {
    text-align: center;

    padding: 50px;

    color: #777;
}

.empty-state {
    background: white;

    text-align: center;

    padding: 60px 20px;

    border-radius: 12px;
}

.empty-icon {
    font-size: 45px;
    margin-bottom: 10px;
}

.empty-state h3 {
    color: #0b1033;
}

.empty-state p {
    color: #777;

    margin: 8px 0 20px;
}

.hidden {
    display: none !important;
}


/* ================= RESPONSIVE ================= */

@media (max-width: 960px) {
    .solution-grid {
        grid-template-columns: 1fr;
    }

    .top-links {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
}


@media (max-width: 700px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-right {
        width: 100%;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .nav-container {
        overflow-x: auto;
        gap: 18px;
    }

    .page-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .filters {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 14px 16px;
    }

    .logo h1 {
        font-size: 24px;
    }

    .solution-card {
        padding: 20px 16px;
    }


    .card-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .card-info {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-actions {
        flex-direction: column;
        width: 100%;
    }

    .card-actions button,
    .card-actions a {
        width: 100%;
    }
}