* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family:
        Inter,
        Arial,
        Helvetica,
        sans-serif;

    background: #f4f6f8;
    color: #1f2937;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    min-height: 72px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;

    display: flex;
    align-items: center;

    padding: 0 28px;

    gap: 30px;

    position: sticky;
    top: 0;

    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    min-width: 230px;
}

.brand-icon,
.login-logo {
    width: 42px;
    height: 42px;

    border-radius: 10px;

    background: #166534;
    color: #ffffff;

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

    font-size: 21px;
    font-weight: 800;
}

.brand-title {
    font-size: 17px;
    font-weight: 800;
}

.brand-subtitle {
    margin-top: 2px;
    font-size: 11px;
    color: #6b7280;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 6px;

    flex: 1;
}

.nav-link {
    padding: 10px 14px;

    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;

    color: #4b5563;
}

.nav-link:hover {
    background: #f3f4f6;
    color: #166534;
}

.account {
    display: flex;
    align-items: center;

    gap: 14px;
}

.account-info {
    display: flex;
    flex-direction: column;

    text-align: right;

    font-size: 13px;
}

.account-info span {
    color: #6b7280;
    font-size: 11px;

    margin-top: 2px;
}

.page {
    max-width: 1500px;
    margin: 0 auto;

    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0;

    font-size: 27px;
}

.page-header p {
    margin: 7px 0 0;

    color: #6b7280;

    font-size: 14px;
}

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    padding: 22px;
}

.stat-label {
    color: #6b7280;

    font-size: 13px;
    font-weight: 600;
}

.stat-number {
    margin-top: 10px;

    font-size: 32px;
    font-weight: 800;
}

.stat-danger {
    border-color: #fecaca;
}

.panel,
.form-card {
    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    overflow: hidden;
}

.panel-header {
    padding: 20px 22px;

    border-bottom: 1px solid #e5e7eb;

    display: flex;

    justify-content: space-between;

    align-items: center;
}

.panel-header h2 {
    margin: 0;

    font-size: 18px;
}

.panel-header p {
    margin: 5px 0 0;

    color: #6b7280;

    font-size: 13px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;
}

th {
    padding: 13px 16px;

    text-align: left;

    background: #f9fafb;

    color: #6b7280;

    font-size: 12px;

    text-transform: uppercase;

    letter-spacing: 0.03em;

    border-bottom: 1px solid #e5e7eb;
}

td {
    padding: 15px 16px;

    font-size: 13px;

    border-bottom: 1px solid #f0f1f3;

    vertical-align: middle;
}

tbody tr:hover {
    background: #fafafa;
}

.badge {
    display: inline-flex;

    align-items: center;

    border-radius: 999px;

    padding: 5px 9px;

    font-size: 10px;

    font-weight: 800;

    white-space: nowrap;
}

.badge-neutral {
    background: #f3f4f6;
    color: #374151;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-new {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-accepted {
    background: #e0e7ff;
    color: #4338ca;
}

.status-in_progress {
    background: #fef3c7;
    color: #92400e;
}

.status-review {
    background: #ede9fe;
    color: #6d28d9;
}

.status-revision {
    background: #ffedd5;
    color: #c2410c;
}

.status-completed,
.status-closed {
    background: #dcfce7;
    color: #166534;
}

.status-cancelled {
    background: #f3f4f6;
    color: #6b7280;
}

.progress {
    width: 100px;
    height: 6px;

    margin-top: 5px;

    background: #e5e7eb;

    border-radius: 999px;

    overflow: hidden;
}

.progress-bar {
    height: 100%;

    background: #166534;
}

.progress-text {
    font-size: 11px;
    font-weight: 700;
}

.btn {
    display: inline-flex;

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

    min-height: 40px;

    border: 1px solid transparent;

    border-radius: 9px;

    padding: 9px 16px;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.btn-primary {
    background: #166534;

    border-color: #166534;

    color: #ffffff;
}

.btn-primary:hover {
    background: #14532d;

    border-color: #14532d;
}

.btn-outline {
    background: #ffffff;

    border-color: #d1d5db;

    color: #374151;
}

.btn-outline:hover {
    background: #f9fafb;
}

.btn-block {
    width: 100%;
}

.login-page {
    min-height: 100vh;

    display: flex;

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

    padding: 24px;

    background:
        linear-gradient(
            135deg,
            #f0fdf4,
            #f4f6f8 55%,
            #ecfdf5
        );
}

.login-shell {
    width: 100%;

    max-width: 410px;
}

.login-card {
    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 18px;

    padding: 34px;

    box-shadow:
        0 15px 45px
        rgba(0, 0, 0, 0.08);
}

.login-logo {
    margin: 0 auto 17px;

    width: 52px;
    height: 52px;
}

.login-card h1 {
    text-align: center;

    margin: 0;

    font-size: 25px;
}

.login-desc {
    text-align: center;

    color: #6b7280;

    font-size: 13px;

    line-height: 1.5;

    margin: 8px 0 28px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    font-size: 13px;

    font-weight: 700;
}

.form-control {
    width: 100%;

    min-height: 44px;

    padding: 10px 12px;

    border: 1px solid #d1d5db;

    border-radius: 9px;

    background: #ffffff;

    font-size: 14px;

    outline: none;
}

.form-control:focus {
    border-color: #166534;

    box-shadow:
        0 0 0 3px
        rgba(22, 101, 52, 0.10);
}

select.form-control {
    cursor: pointer;
}

.form-card {
    padding: 24px;
}

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 0 20px;
}

.form-actions {
    border-top: 1px solid #e5e7eb;

    margin-top: 8px;
    padding-top: 20px;

    display: flex;
    justify-content: flex-end;

    gap: 10px;
}

.flash-wrapper {
    margin-bottom: 18px;
}

.login-page .flash-wrapper {
    position: fixed;

    top: 20px;

    left: 50%;

    transform: translateX(-50%);

    width: min(90%, 600px);

    z-index: 999;
}

.flash {
    padding: 12px 15px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 600;

    margin-bottom: 8px;

    border: 1px solid transparent;
}

.flash-success {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.flash-danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.flash-warning {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.empty-state {
    text-align: center;

    padding: 60px 20px;

    color: #6b7280;
}

.empty-icon {
    font-size: 42px;
}

.empty-state h3 {
    color: #374151;

    margin: 15px 0 7px;
}

.empty-state p {
    margin: 0;
}

.error-page {
    max-width: 600px;

    margin: 80px auto;

    text-align: center;
}

.error-code {
    font-size: 70px;
    font-weight: 900;

    color: #166534;
}

.error-page h1 {
    margin: 0 0 10px;
}

.error-page p {
    color: #6b7280;

    margin-bottom: 25px;
}

.footer {
    padding: 20px;

    text-align: center;

    color: #9ca3af;

    font-size: 11px;
}


@media (max-width: 900px) {

    .topbar {
        padding: 12px 16px;

        flex-wrap: wrap;

        gap: 10px;
    }

    .brand {
        flex: 1;
    }

    .topnav {
        order: 3;

        width: 100%;
    }

    .account-info {
        display: none;
    }

    .page {
        padding: 20px 14px;
    }

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

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

}


@media (max-width: 560px) {

    .brand-subtitle {
        display: none;
    }

    .page-header {
        align-items: flex-start;

        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;

        gap: 10px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-number {
        font-size: 25px;
    }

    .login-card {
        padding: 26px 20px;
    }

}


/* PROPOSAL MODULE */

.ticket-link {
    color: #166534;
    font-weight: 800;
}

.ticket-link:hover {
    text-decoration: underline;
}

.ticket-number {
    display: inline-block;

    margin-bottom: 8px;

    padding: 5px 10px;

    border-radius: 7px;

    background: #dcfce7;

    color: #166534;

    font-size: 12px;
    font-weight: 800;
}

.badge-large {
    padding: 9px 14px;

    font-size: 12px;
}

.section-title {
    margin: 10px 0 20px;

    padding-bottom: 10px;

    border-bottom: 1px solid #e5e7eb;

    font-size: 15px;
    font-weight: 800;

    color: #166534;
}

.section-title:not(:first-child) {
    margin-top: 25px;
}

.textarea {
    min-height: 130px;

    resize: vertical;
}

.textarea-small {
    min-height: 90px;

    resize: vertical;
}

.form-help {
    margin-top: 6px;

    font-size: 11px;

    color: #6b7280;
}

.detail-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        360px;

    gap: 20px;

    align-items: start;
}

.detail-main {
    display: flex;

    flex-direction: column;

    gap: 20px;
}

.detail-side {
    display: flex;

    flex-direction: column;

    gap: 20px;
}

.detail-panel {
    overflow: hidden;
}

.info-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;

    padding: 22px;
}

.info-item {
    display: flex;

    flex-direction: column;

    gap: 5px;
}

.info-item span,
.info-label {
    color: #6b7280;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 0.04em;

    font-weight: 700;
}

.info-item strong {
    font-size: 14px;
}

.scope-box {
    margin: 0 22px 22px;

    padding: 16px;

    background: #f9fafb;

    border: 1px solid #e5e7eb;

    border-radius: 10px;
}

.scope-text {
    margin-top: 8px;

    white-space: pre-wrap;

    line-height: 1.6;

    font-size: 13px;
}

.file-list {
    padding: 0 22px;
}

.file-row {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 14px 0;

    border-bottom: 1px solid #f0f1f3;
}

.file-name {
    font-size: 13px;

    font-weight: 700;
}

.file-meta {
    margin-top: 4px;

    color: #6b7280;

    font-size: 10px;
}

.btn-small {
    min-height: 32px;

    padding: 6px 10px;

    font-size: 11px;
}

.inline-form-box {
    margin: 20px 22px;

    padding: 18px;

    background: #f9fafb;

    border: 1px solid #e5e7eb;

    border-radius: 10px;
}

.empty-small {
    padding: 25px;

    text-align: center;

    color: #9ca3af;

    font-size: 12px;
}

.action-panel .panel-header {
    padding: 17px 20px;
}

.action-content {
    padding: 20px;
}

.action-content form + form {
    padding-top: 20px;

    margin-top: 20px;

    border-top: 1px solid #e5e7eb;
}

.comment-list {
    padding: 10px 22px 0;
}

.comment-item {
    padding: 14px 0;

    border-bottom: 1px solid #f0f1f3;
}

.comment-header {
    display: flex;

    justify-content: space-between;

    gap: 15px;
}

.comment-header strong {
    font-size: 13px;
}

.comment-header span {
    color: #9ca3af;

    font-size: 10px;
}

.comment-text {
    margin-top: 7px;

    font-size: 13px;

    line-height: 1.5;

    white-space: pre-wrap;
}

.timeline {
    padding: 22px;
}

.timeline-item {
    position: relative;

    display: flex;

    gap: 13px;

    padding-bottom: 20px;
}

.timeline-dot {
    flex: 0 0 10px;

    width: 10px;
    height: 10px;

    margin-top: 4px;

    border-radius: 50%;

    background: #166534;
}

.timeline-item strong {
    font-size: 12px;
}

.timeline-meta {
    margin-top: 4px;

    color: #9ca3af;

    font-size: 10px;
}

.revision-item {
    padding: 12px 0;

    border-bottom: 1px solid #e5e7eb;
}

.revision-item:first-child {
    padding-top: 0;
}

.revision-item:last-child {
    border-bottom: 0;
}

.revision-item strong {
    color: #c2410c;

    font-size: 13px;
}

.revision-item p {
    margin: 6px 0;

    font-size: 12px;

    line-height: 1.5;
}

.revision-item span {
    color: #9ca3af;

    font-size: 10px;
}


@media (max-width: 1100px) {

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

    .detail-side {
        display: grid;

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

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

}


@media (max-width: 700px) {

    .detail-side {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr 1fr;

        gap: 15px;
    }

    .comment-header {
        flex-direction: column;

        gap: 3px;
    }

}


@media (max-width: 480px) {

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

}


/* DASHBOARD V2 */

.stats-grid-v2 {
    grid-template-columns:
        repeat(7, minmax(0, 1fr));
}

.stat-sub {
    margin-top: 7px;

    color: #9ca3af;

    font-size: 10px;

    line-height: 1.4;
}

.stat-new {
    border-color: #bfdbfe;
}

.stat-process {
    border-color: #fde68a;
}

.stat-review {
    border-color: #ddd6fe;
}

.stat-complete {
    border-color: #bbf7d0;
}

.stat-warning {
    border-color: #fed7aa;
}

.stat-danger {
    border-color: #fecaca;
}

.deadline-badge {
    display: inline-flex;

    margin-top: 5px;

    padding: 3px 7px;

    border-radius: 999px;

    font-size: 9px;

    font-weight: 800;

    white-space: nowrap;
}

.deadline-overdue {
    background: #fee2e2;

    color: #991b1b;
}

.deadline-today {
    background: #ffedd5;

    color: #c2410c;
}

.deadline-soon {
    background: #fef3c7;

    color: #92400e;
}

.priority-badge {
    display: inline-flex;

    align-items: center;

    padding: 4px 8px;

    border-radius: 999px;

    font-size: 9px;

    font-weight: 800;

    white-space: nowrap;
}

.priority-normal {
    background: #f3f4f6;

    color: #4b5563;
}

.priority-urgent {
    background: #fef3c7;

    color: #92400e;
}

.priority-very_urgent {
    background: #fee2e2;

    color: #991b1b;
}

.filter-panel {
    margin-bottom: 18px;

    padding: 20px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 14px;
}

.filter-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 0 16px;
}

.filter-search {
    grid-column: span 2;
}

.filter-actions {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    padding-top: 4px;
}

.result-info {
    margin: 0 0 12px 4px;

    color: #6b7280;

    font-size: 12px;
}

.result-info strong {
    color: #111827;
}

.table-subtext {
    margin-top: 4px;

    color: #9ca3af;

    font-size: 10px;
}


@media (max-width: 1450px) {

    .stats-grid-v2 {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

}


@media (max-width: 1000px) {

    .stats-grid-v2 {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

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

}


@media (max-width: 650px) {

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

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

    .filter-search {
        grid-column: auto;
    }

    .filter-actions {
        flex-direction: column-reverse;
    }

    .filter-actions .btn {
        width: 100%;
    }

}


/* CLICKABLE DASHBOARD CARDS */

.stat-card-link {
    display: block;

    color: inherit;

    text-decoration: none;

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

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

    box-shadow:
        0 8px 22px
        rgba(0, 0, 0, 0.06);
}

.quick-filter-info {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    margin-bottom: 14px;

    padding: 12px 16px;

    border: 1px solid #bbf7d0;

    border-radius: 10px;

    background: #f0fdf4;
}

.quick-filter-info div {
    display: flex;

    align-items: center;

    gap: 9px;
}

.quick-filter-info span {
    color: #6b7280;

    font-size: 11px;

    font-weight: 700;
}

.quick-filter-info strong {
    color: #166534;

    font-size: 13px;
}

.quick-filter-clear {
    color: #166534;

    font-size: 11px;

    font-weight: 800;
}

.quick-filter-clear:hover {
    text-decoration: underline;
}


@media (max-width: 600px) {

    .quick-filter-info {
        align-items: flex-start;

        flex-direction: column;
    }

}


/* NOTIFICATION CENTER */

.notification-header-link {
    position: relative;

    width: 42px;
    height: 42px;

    display: flex;

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

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    background: #ffffff;

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

.notification-header-link:hover {
    background: #f9fafb;

    border-color: #d1d5db;
}

.notification-bell {
    font-size: 18px;
}

.notification-header-badge {
    position: absolute;

    top: -6px;
    right: -6px;

    min-width: 20px;
    height: 20px;

    padding: 0 5px;

    display: flex;

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

    border: 2px solid #ffffff;

    border-radius: 999px;

    background: #dc2626;

    color: #ffffff;

    font-size: 9px;

    font-weight: 800;
}

.notification-list {
    display: flex;

    flex-direction: column;
}

.notification-item {
    display: flex;

    align-items: center;

    gap: 15px;

    padding: 18px 22px;

    border-bottom: 1px solid #eef0f2;

    color: #111827;

    transition:
        background 0.15s ease;
}

.notification-item:last-child {
    border-bottom: 0;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-unread {
    background: #f0fdf4;
}

.notification-unread:hover {
    background: #ecfdf5;
}

.notification-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;

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

    border-radius: 10px;

    background: #f3f4f6;

    font-size: 18px;
}

.notification-unread .notification-icon {
    background: #dcfce7;
}

.notification-body {
    min-width: 0;

    flex: 1;
}

.notification-title-row {
    display: flex;

    align-items: center;

    gap: 9px;
}

.notification-title-row strong {
    font-size: 14px;
}

.notification-new {
    display: inline-flex;

    padding: 3px 7px;

    border-radius: 999px;

    background: #166534;

    color: #ffffff;

    font-size: 8px;

    font-weight: 800;
}

.notification-message {
    margin-top: 5px;

    color: #4b5563;

    font-size: 12px;

    line-height: 1.5;
}

.notification-meta {
    margin-top: 7px;

    color: #9ca3af;

    font-size: 10px;
}

.notification-arrow {
    color: #9ca3af;

    font-size: 28px;
}


@media (max-width: 700px) {

    .notification-header-link {
        width: 38px;
        height: 38px;
    }

    .notification-item {
        align-items: flex-start;

        padding: 16px;
    }

    .notification-arrow {
        display: none;
    }

}
