* {
    box-sizing: border-box;
}

body {
    background-color: #f4f5f7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #172b4d;
}

/* SIDEBAR */
.sidebar {
    width: 240px;
    min-height: 100vh;
    background-color: #0052cc;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-brand {
    padding: 20px 16px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand span {
    background: #fff;
    color: #0052cc;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 16px;
    font-weight: 800;
}

.sidebar-nav {
    padding: 12px 0;
    flex: 1;
}

.sidebar-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 16px 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    border-radius: 0;
    transition: background 0.15s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.sidebar-nav a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    object-fit: cover;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-user-logout {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 16px;
    padding: 4px;
}

.sidebar-user-logout:hover {
    color: #fff;
}

.sidebar-user-id {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

/* MAIN CONTENT */
.main-content {
    margin-left: 240px;
    padding: 28px 32px;
    min-height: 100vh;
}

/* TOP BAR */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.topbar h4 {
    font-size: 20px;
    font-weight: 700;
    color: #172b4d;
    margin: 0;
}

/* CARD */
.erp-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dfe1e6;
    padding: 24px;
}

/* TABLE */
.erp-table {
    font-size: 13px;
    min-width: 1400px;
}

.erp-table thead th {
    background-color: #f4f5f7;
    color: #5e6c84;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #dfe1e6;
    white-space: nowrap;
    padding: 10px 12px;
}

.erp-table tbody tr {
    transition: background 0.1s;
}

.erp-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #dfe1e6;
    vertical-align: middle;
    color: #172b4d;
}

.issue-id-btn {
    font-weight: 700;
    color: #0052cc;
    white-space: nowrap;
    background-color: transparent;
    border: 1px solid #0052cc;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 13px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s;
    cursor: pointer;
}

.issue-id-btn:hover {
    background-color: #0052cc;
    color: #deebff;
}

.issue-edit-btn {
    padding: 3px 6px;
}

.issue-edit-btn i {
    font-size: 13px;
}

/* BADGES */
.badge-status {
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Status badges */
.status-open {
    background: #dfe1e6;
    color: #42526e;
}

.status-in_progress {
    background: #deebff;
    color: #0052cc;
}

.status-on_hold {
    background: #fff0b3;
    color: #974f0c;
}

.status-completed {
    background: #e3fcef;
    color: #006644;
}

.status-reopened {
    background: #ffebe6;
    color: #bf2600;
}

/* QA Status badges */
.qa-open {
    background: #dfe1e6;
    color: #42526e;
}

.qa-in_progress {
    background: #deebff;
    color: #0052cc;
}

.qa-on_hold {
    background: #fff0b3;
    color: #974f0c;
}

.qa-approved {
    background: #e3fcef;
    color: #006644;
}

.qa-rejected {
    background: #ffebe6;
    color: #bf2600;
}

/* Delivery Status badges */
.delivery-delivered {
    background: #e3fcef;
    color: #006644;
}

.delivery-undelivered {
    background: #ffebe6;
    color: #bf2600;
}

/* Type badges */
.type-issue {
    background: #ffebe6;
    color: #bf2600;
}

.type-requirement {
    background: #e3fcef;
    color: #006644;
}

.type-modification {
    background: #deebff;
    color: #0052cc;
}

.type-module_development {
    background: #eae6ff;
    color: #403294;
}

/* Category badges */
.category-critical {
    background: #ffebe6;
    color: #bf2600;
}

.category-high {
    background: #fff0b3;
    color: #974f0c;
}

.category-medium {
    background: #deebff;
    color: #0052cc;
}

.category-regular {
    background: #f4f5f7;
    color: #42526e;
}

/* BUTTONS */
.btn {
    background-color: #0052cc;
    color: #fff;
    border: none;
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
    cursor: pointer;
}

.btn:hover {
    background-color: #0065ff;
    color: #fff;
}

.btn-outline {
    background-color: transparent;
    color: #0052cc;
    border: 1px solid #0052cc;
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.btn-outline:hover {
    background-color: #deebff;
    color: #0052cc;
}

/* FORM */
.form-label {
    font-weight: 600;
    font-size: 13px;
    color: #172b4d;
    margin-bottom: 4px;
}

.form-control,
.form-select {
    border: 2px solid #dfe1e6;
    border-radius: 4px;
    font-size: 14px;
    color: #172b4d;
    transition: border-color 0.15s;
}

.form-control:focus,
.form-select:focus {
    border-color: #0052cc;
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.15);
}

.section-divider {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #5e6c84;
    border-bottom: 1px solid #dfe1e6;
    padding-bottom: 6px;
    margin-bottom: 16px;
    margin-top: 8px;
}

.detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5e6c84;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 14px;
    color: #172b4d;
    font-weight: 400;
}

.preserve-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.description-box {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fafafa;
}

/* DELETE CONFIRMATION PAGE */
.delete-confirm-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

.delete-confirm-card {
    background: #fff;
    border: 1px solid #dfe1e6;
    border-radius: 10px;
    padding: 36px 32px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 4px 14px rgba(9, 30, 66, 0.08);
    text-align: center;
}

.delete-icon {
    width: 56px;
    height: 56px;
    background: #ffebe6;
    color: #bf2600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 24px;
}

.delete-confirm-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: #172b4d;
    margin-bottom: 6px;
}

.delete-subtext {
    font-size: 13px;
    color: #5e6c84;
    margin-bottom: 18px;
}

.issue-ref {
    background: #f4f5f7;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #42526e;
    margin-bottom: 22px;
}

.btn-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.issue-project {
    display: inline-block;
    background: #deebff;
    color: #0052cc;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 6px;
}

/* DASHBOARD PANELS */
.dash-panels {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dash-panel {
    background: #fff;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    padding: 20px;
}

.dash-panel-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5e6c84;
    margin-bottom: 14px;
}

.dash-grid {
    display: grid;
    gap: 12px;
}

.dash-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

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

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

.dash-stat {
    background: #f4f5f7;
    border-radius: 6px;
    padding: 14px 8px;
    text-align: center;
}

.dash-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #172b4d;
}

.dash-stat-label {
    font-size: 11px;
    color: #5e6c84;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 4px;
}

/* DEVELOPER CARDS */
.dev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.dev-card {
    background: #fff;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    padding: 18px;
}

.dev-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #dfe1e6;
}

.dev-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #deebff;
    color: #0052cc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    object-fit: cover;
}

.dev-name {
    font-size: 14px;
    font-weight: 600;
    color: #172b4d;
}

.dev-role {
    font-size: 12px;
    color: #5e6c84;
    margin-top: 2px;
}

.dev-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.dev-stat-box {
    background: #f4f5f7;
    border-radius: 6px;
    padding: 10px 12px;
}

.dev-stat-label {
    font-size: 11px;
    color: #5e6c84;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.dev-stat-value {
    font-size: 20px;
    font-weight: 600;
    color: #172b4d;
}

.dev-resolution {
    margin-top: 4px;
}

.dev-resolution-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #5e6c84;
    margin-bottom: 6px;
}

.dev-progress-track {
    height: 6px;
    background: #dfe1e6;
    border-radius: 4px;
    overflow: hidden;
}

.dev-progress-fill {
    height: 100%;
    background: #0052cc;
    border-radius: 4px;
}

/* NOTIFICATIONS */
.notif-badge {
    background: #bf2600;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.notif-new_assignment {
    background: #deebff;
    color: #0052cc;
}

.notif-reassignment {
    background: #fff0b3;
    color: #974f0c;
}

.notif-upcoming_delivery {
    background: #e3fcef;
    color: #006644;
}

.notif-overdue {
    background: #ffebe6;
    color: #bf2600;
}

.notif-qa_rejection {
    background: #ffebe6;
    color: #bf2600;
}

.notif-completed {
    background: #e3fcef;
    color: #006644;
}

.notif-qa_approval {
    background: #e3fcef;
    color: #006644;
}

.notif-reopened {
    background: #ffebe6;
    color: #bf2600;
}

.notif-dev_comment {
    background: #deebff;
    color: #0052cc;
}

.notif-qa_comment {
    background: #eae6ff;
    color: #403294;
}

.notif-delivered {
    background: #e3fcef;
    color: #006644;
}

.erp-card ul li a:hover {
    background-color: #f4f5f7;
    border-radius: 6px;
    margin: 0 -8px;
    padding: 14px 8px;
}

/* TABLE SCROLL */
.table-scroll-hidden {
    overflow-x: auto;
    scrollbar-width: none;
}

.table-scroll-hidden::-webkit-scrollbar {
    display: none;
}

/* FROZEN COLUMNS */
.erp-table th:nth-child(1),
.erp-table td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    border-right: 1px solid #dfe1e6;
    width: 110px;
    min-width: 110px;
    max-width: 110px;
}

.erp-table th:nth-child(2),
.erp-table td:nth-child(2) {
    position: sticky;
    left: 110px;
    z-index: 2;
    background: #fff;
    border-right: 1px solid #dfe1e6;
}

.erp-table thead th:nth-child(1),
.erp-table thead th:nth-child(2) {
    background: #f4f5f7;
    z-index: 3;
}

.erp-table tbody tr:hover td:nth-child(1),
.erp-table tbody tr:hover td:nth-child(2) {
    background: #f4f5f7;
}

.erp-table td.empty-row-cell {
    position: static;
    width: auto;
    min-width: 0;
    max-width: none;
}

/* ALL COLUMNS DIVIDER */
.erp-table th,
.erp-table td {
    border-right: 1px solid #dfe1e6;
}

.erp-table th:last-child,
.erp-table td:last-child {
    border-right: none;
}

/* CONSISTENT ROW HOVER */
.erp-table tbody tr:hover td {
    background: #f4f5f7;
}

.erp-table tbody tr:hover td:nth-child(1),
.erp-table tbody tr:hover td:nth-child(2) {
    background: #f4f5f7;
}

/* STICKY SCROLLBAR */
.sticky-scrollbar-wrapper {
    overflow-x: scroll;
    overflow-y: hidden;
    height: 8px;
    display: none;
    z-index: 999;
    scrollbar-width: thin;
    scrollbar-color: #0052cc #dfe1e6;
}

.sticky-scrollbar-wrapper::-webkit-scrollbar {
    height: 8px;
}

.sticky-scrollbar-wrapper::-webkit-scrollbar-track {
    background: #dfe1e6;
}

.sticky-scrollbar-wrapper::-webkit-scrollbar-thumb {
    background: #0052cc;
    border-radius: 5px;
}

.sticky-scrollbar-wrapper::-webkit-scrollbar-thumb:hover {
    background: #0065ff;
}

.sticky-scrollbar-inner {
    height: 8px;
}

@media (max-width: 992px) {
    .dash-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

/* QA MEMBER CHECKBOXES */
.qa-checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin-top: 0;
}

.qa-checkbox-list li {
    list-style: none;
}

.qa-checkbox-list label {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f4f5f7;
    border: 1px solid #dfe1e6;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}

.qa-checkbox-list label:hover {
    background: #deebff;
    border-color: #0052cc;
}

.qa-checkbox-list input[type="checkbox"]:checked+span,
.qa-checkbox-list input[type="checkbox"] {
    accent-color: #0052cc;
}

/* ISSUE TABS */
.issue-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    padding: 8px 12px;
}

.issue-tab {
    background: transparent;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #5e6c84;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, color 0.15s;
}

.issue-tab:hover {
    background: #f4f5f7;
    color: #172b4d;
}

.issue-tab.active {
    background: #deebff;
    color: #0052cc;
}

.tab-notif-badge {
    background: #bf2600;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.4;
}

.login-brand-badge {
    background: #0052cc;
    color: #fff;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 16px;
    font-weight: 800;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(160deg, rgba(20, 30, 48, 0.25) 0%, rgba(20, 30, 48, 0.25) 100%), url("../img/BGLogin.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.login-card {
    width: 100%;
    max-width: 460px;
    border: none;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    background-color: #f1f2f4;
}

.login-card .card-body {
    padding: 3rem 2.75rem;
}

.login-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1c2733;
    margin-bottom: 0.35rem;
}

.login-subtitle {
    font-size: 0.95rem;
    color: #8a94a3;
    margin-bottom: 2.25rem;
}

.login-page .form-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.35rem;
}

.login-page .form-control {
    border-radius: 8px;
    border: 1px solid #dde2e8;
    padding: 0.6rem 0.85rem;
}

.login-page .form-control:focus {
    border-color: #0052cc;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.12);
}

.login-page .btn-primary {
    font-size: 1.05rem;
    background: #0052cc;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.login-page .btn-primary:hover {
    background: #003d99;
}

.login-page .alert-danger {
    border-radius: 8px;
    border: none;
    background: #fdecea;
    color: #b3261e;
}

.comment-history {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fafafa;
}

.comment-entry {
    padding: 6px 0;
    border-bottom: 1px solid #ececec;
}

.comment-entry:last-child {
    border-bottom: none;
}

.comment-meta {
    font-size: 11px;
    color: #888;
    margin-bottom: 2px;
}

.comment-text {
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.comment-input-row textarea {
    flex: 1;
}

.comment-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: 1px solid #0052cc;
    border-radius: 50%;
    background: #0052cc;
    color: #fff;
    cursor: pointer;
}

.comment-send-btn:hover {
    background: #003d99;
    border-color: #003d99;
}

.comment-send-btn:disabled {
    background: #a8b8d8;
    border-color: #a8b8d8;
    cursor: not-allowed;
}

.comment-send-btn i {
    font-size: 15px;
}

.attachment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #ececec;
}

.attachment-item:last-child {
    border-bottom: none;
}

.attachment-name {
    word-break: break-word;
}

.attachment-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #0052cc;
    color: #0052cc;
    text-decoration: none;
}

.attachment-download-btn:hover {
    background-color: #deebff;
    color: #0052cc;
}