* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}

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

.sidebar {
    width: 250px;
    background: #102347;
    color: #fff;
    padding: 20px;
}

.brand {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar a {
    color: #d1d5db;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 6px;
}

.sidebar a:hover {
    background: #13203f;
    color: #fff;
}

.nav-section {
    margin-top: 14px;
    font-size: 12px;
    text-transform: uppercase;
    color: #8ca0c7;
}

.content {
    flex: 1;
    padding: 24px;
    background: #eef1f6;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    font-weight: 600;
}

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

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

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

.form-card,
.detail-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    max-width: 800px;
}

.form-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-card input,
.form-card select,
.form-card textarea {
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

.form-actions button {
    background: #111827;
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 10px 14px;
    cursor: pointer;
}

/* AUTH PAGE */

.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at left, rgba(18,106,117,0.35) 0%, rgba(18,106,117,0.08) 20%, transparent 42%),
        linear-gradient(135deg, #07132d 0%, #07132d 55%, #081a42 100%);
    color: #ffffff;
}

.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.auth-shell {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.auth-brand {
    margin-bottom: 18px;
}

.auth-brand h1 {
    margin: 0 0 6px 0;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-brand h1 span {
    color: #22c55e;
}

.auth-brand p {
    margin: 0;
    color: #90a4c8;
    font-size: 14px;
}

.login-card {
    background: rgba(6, 18, 44, 0.78);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    text-align: left;
    backdrop-filter: blur(4px);
}

.login-card h2 {
    margin: 0 0 4px 0;
    font-size: 30px;
    color: #ffffff;
}

.login-card .muted {
    margin: 0 0 18px 0;
    color: #8ea3c8;
    font-size: 14px;
}

.login-card label {
    display: block;
    margin: 14px 0 6px;
    font-size: 13px;
    color: #d7e1f2;
}

.login-card input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: #f3f6fb;
    color: #111827;
    outline: none;
}

.login-card button {
    width: 100%;
    margin-top: 18px;
    padding: 12px 14px;
    border: 0;
    border-radius: 8px;
    background: #22c55e;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.login-card button:hover {
    background: #16a34a;
}

.login-footer {
    margin-top: 14px;
    text-align: center;
    font-size: 12px;
    color: #6f88b4;
}

.alert-error {
    background: rgba(127, 29, 29, 0.35);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
}





.tab-bar-right {
    justify-content: flex-end;
}

.row-archived {
    background: #fff7ed;
}




.tab-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.tab-bar-right {
    justify-content: flex-end;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid #35507f;
    background: #102347;
    color: #dbe7ff;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.tab-btn:hover {
    background: #18315f;
    border-color: #31456d;
    color: #ffffff;
}

.tab-btn.active {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
}


.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.page-toolbar-right {
    margin-left: auto;
}

.filter-select {
    min-width: 220px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #35507f;
    background: #102347;
    color: #dbe7ff;
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.filter-select:hover,
.filter-select:focus {
    background: #18315f;
    border-color: #31456d;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.btn-link,
.table a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.18s ease;
}

.btn-link {
    background: #102347;
    color: #ffffff;
    border: 1px solid #35507f;
}

.btn-link:hover,
.table a:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(8, 20, 47, 0.18);
}

.btn-primary {
    background: #102347;
    color: #ffffff;
    border: 1px solid #35507f;
}

.btn-primary:hover {
    background: #18315f;
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    color: #111827;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
    color: #111827;
    box-shadow: 0 6px 18px rgba(17,24,39,0.10);
}

.btn-warning {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fdba74;
}

.btn-warning:hover {
    background: #ffedd5;
    color: #7c2d12;
    box-shadow: 0 6px 18px rgba(154,52,18,0.12);
}

.btn-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.btn-success:hover {
    background: #bbf7d0;
    color: #14532d;
    box-shadow: 0 6px 18px rgba(22,101,52,0.12);
}

.inline-form {
    display: inline;
}

.inline-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.inline-form button:hover {
    transform: translateY(-1px);
}

.table td {
    vertical-align: middle;
}


/* softer blue buttons */
.btn-primary,
.btn-link.btn-primary {
    background: #1e4f91 !important;
    border: 1px solid #3d6fb3 !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-link.btn-primary:hover {
    background: #2a62ad !important;
    border-color: #4f83c9 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(42, 98, 173, 0.22) !important;
}

.filter-select {
    background: #1e4f91 !important;
    border-color: #3d6fb3 !important;
    color: #ffffff !important;
}

.filter-select:hover,
.filter-select:focus {
    background: #2a62ad !important;
    border-color: #4f83c9 !important;
    box-shadow: 0 0 0 3px rgba(79, 131, 201, 0.18) !important;
}


/* stronger but still clean hover */
.btn-primary:hover,
.btn-link.btn-primary:hover,
.btn-secondary:hover,
.btn-warning:hover,
.btn-success:hover,
.inline-form button:hover {
    transform: translateY(-2px) scale(1.02) !important;
}

.btn-primary:hover,
.btn-link.btn-primary:hover {
    box-shadow: 0 10px 24px rgba(42, 98, 173, 0.28) !important;
}

.btn-secondary:hover {
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.14) !important;
}

.btn-warning:hover {
    box-shadow: 0 10px 22px rgba(154, 52, 18, 0.16) !important;
}

.btn-success:hover {
    box-shadow: 0 10px 22px rgba(22, 101, 52, 0.16) !important;
}


/* improve dropdown contrast */
.filter-select {
    background: #ffffff !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
    font-weight: 700 !important;
}

.filter-select option {
    background: #ffffff !important;
    color: #111827 !important;
}

.filter-select option:checked,
.filter-select option[selected] {
    background: #dbeafe !important;
    color: #111827 !important;
    font-weight: 700 !important;
}


/* unified action buttons */
.btn-link,
.table a.btn-primary,
.table a.btn-secondary,
.form-actions a.btn-link,
.form-actions button.btn-primary,
.inline-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.18s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-link:hover,
.table a.btn-primary:hover,
.table a.btn-secondary:hover,
.form-actions a.btn-link:hover,
.form-actions button.btn-primary:hover,
.inline-form button:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn-primary {
    background: #1e4f91 !important;
    border-color: #3d6fb3 !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background: #2a62ad !important;
    border-color: #4f83c9 !important;
    box-shadow: 0 10px 24px rgba(42, 98, 173, 0.28) !important;
    color: #ffffff !important;
}

.btn-secondary {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: #d1d5db !important;
}

.btn-secondary:hover {
    background: #f9fafb !important;
    color: #111827 !important;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.14) !important;
}

.btn-warning {
    background: #fff7ed !important;
    color: #9a3412 !important;
    border: 1px solid #fdba74 !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    font-weight: 700 !important;
}

.btn-warning:hover {
    background: #ffedd5 !important;
    color: #7c2d12 !important;
    box-shadow: 0 10px 22px rgba(154, 52, 18, 0.16) !important;
}

.btn-success {
    background: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #86efac !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    font-weight: 700 !important;
}

.btn-success:hover {
    background: #bbf7d0 !important;
    color: #14532d !important;
    box-shadow: 0 10px 22px rgba(22, 101, 52, 0.16) !important;
}

.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.page-toolbar-right {
    margin-left: auto;
}

.filter-select {
    min-width: 220px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #3d6fb3;
    background: #2a62ad;
    color: #ffffff;
    font-weight: 700;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.filter-select:hover,
.filter-select:focus {
    background: #3470c0;
    border-color: #5b8fd1;
    box-shadow: 0 0 0 3px rgba(79, 131, 201, 0.18);
}

.filter-select option {
    background: #ffffff;
    color: #111827;
}

.filter-select option:checked,
.filter-select option[selected] {
    background: #dbeafe;
    color: #111827;
    font-weight: 700;
}\n

.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
\n


/* normal form dropdowns */
.form-card select {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    font-weight: 400 !important;
    box-shadow: none !important;
}

.form-card select:not([name="status"]):not([name="location_status_id"]):not([name="color"]):hover,
.form-card select:not([name="status"]):not([name="location_status_id"]):not([name="color"]):focus {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important;
    outline: none !important;
}


/* status select - neutral base + semantic colors */
.form-card select[name="status"] {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    transition: all 0.18s ease !important;
}

.form-card select[name="status"]:hover,
.form-card select[name="status"]:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10) !important;
    outline: none !important;
}

.form-card select[name="status"].status-active {
    background: #dcfce7 !important;
    border-color: #86efac !important;
    color: #166534 !important;
}

.form-card select[name="status"].status-planned {
    background: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1d4ed8 !important;
}

.form-card select[name="status"].status-inactive {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
}

.form-card select[name="status"].status-archived {
    background: #e5e7eb !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}


.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

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

.status-inactive {
    background: #fee2e2;
    color: #b91c1c;
}

.status-archived {
    background: #e5e7eb;
    color: #475569;
}\n

.filter-select.semantic-filter.filter-active {
    background: #dcfce7 !important;
    border-color: #86efac !important;
    color: #166534 !important;
}

.filter-select.semantic-filter.filter-planned {
    background: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1d4ed8 !important;
}

.filter-select.semantic-filter.filter-inactive {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
}

.filter-select.semantic-filter.filter-archived {
    background: #e5e7eb !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}

.filter-select.semantic-filter.filter-all {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}
\n


/* force active filter green */
.filter-select.semantic-filter.filter-active,
select.filter-select.semantic-filter.filter-active {
    background: #dcfce7 !important;
    border-color: #86efac !important;
    color: #166534 !important;
}


.actions-col {
    text-align: right;
    white-space: nowrap;
}

.action-buttons-right {
    justify-content: flex-end;
}


.actions-col-fixed {
    width: 220px;
    min-width: 220px;
}

.table th.actions-col,
.table td.actions-col {
    text-align: right;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-buttons-right {
    justify-content: flex-end;
}


/* status dropdown options should stay neutral white like normal selects */
.form-card select[name="status"] option {
    background: #ffffff !important;
    color: #111827 !important;
}


.status-green { background: #dcfce7; color: #166534; }
.status-blue { background: #dbeafe; color: #1d4ed8; }
.status-red { background: #fee2e2; color: #b91c1c; }
.status-gray { background: #e5e7eb; color: #475569; }
.status-orange { background: #ffedd5; color: #9a3412; }
.status-yellow { background: #fef9c3; color: #854d0e; }
.status-purple { background: #f3e8ff; color: #7e22ce; }
.status-teal { background: #ccfbf1; color: #0f766e; }
.status-cyan { background: #cffafe; color: #0e7490; }
.status-brown { background: #efebe9; color: #6d4c41; }

/* Professional NMS Sidebar v4 - Compact enterprise */
.sidebar {
    width: 250px;
    flex: 0 0 250px;
    background: #0f2347;
    color: #ffffff;
    padding: 16px 12px;
    border-right: 1px solid rgba(148, 163, 184, .18);
}

.brand {
    margin: 0 0 12px;
    padding: 8px 10px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, .20);
}

.brand-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #ffffff;
    line-height: 1.15;
}

.brand-subtitle {
    margin-top: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #9fb6db;
    letter-spacing: .02em;
    line-height: 1.2;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.nav-section {
    margin: 12px 10px 5px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, .13);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #91acd5;
    line-height: 1.1;
}

.nav-section:first-of-type {
    margin-top: 6px;
}

.sidebar a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 31px;
    margin: 0;
    padding: 6px 10px 6px 16px;
    border-radius: 8px;
    color: #dbe7f7;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background .14s ease, color .14s ease, border-color .14s ease;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, .055);
    color: #ffffff;
}

.sidebar a.active {
    background: rgba(255, 255, 255, .075);
    color: #ffffff;
    border-color: rgba(147, 197, 253, .24);
    font-weight: 700;
}

.sidebar a.active::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 999px;
    background: #3b82f6;
}

.sidebar a[href="/logout"] {
    color: #c7d7ee;
    margin-bottom: 4px;
}

.sidebar a[href="/logout"]:hover {
    background: rgba(239, 68, 68, .12);
    color: #ffffff;
    border-color: rgba(248, 113, 113, .22);
}

.content {
    background: #eef2f7;
}

/* Layout Fix - keep sidebar and content side by side */
.layout {
    display: flex !important;
    align-items: stretch !important;
    min-height: 100vh !important;
}

.sidebar {
    min-height: 100vh !important;
}

.content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 28px 34px !important;
}

/* Global Pagination UI - Interfaces style */
.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.pagination-info {
    color: #334155;
    font-size: 14px;
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.pagination-buttons a,
.pagination-buttons span {
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
}

.pagination-buttons a:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.pagination-buttons .active-page {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
}

.pagination-buttons .disabled-page {
    color: #64748b;
    background: #f8fafc;
    border-color: #e2e8f0;
}


/* Standard Pagination UI - Same as Interfaces */
.pagination-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.pagination-info {
    font-size: 13px;
    color: #64748b;
}

.pagination-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.pagination-buttons a,
.pagination-buttons span {
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    font-size: 13px;
}

.pagination-buttons .active-page {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
}

/* Global Pagination - Odoo pastel colors */
.pagination-wrap {
    background: #ffffff !important;
    border-top: 1px solid #e6e8eb !important;
    padding: 14px 22px !important;
}

.pagination-info {
    color: #4b5563 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

.pagination-buttons a,
.pagination-buttons span {
    background: #eef0f2 !important;
    color: #111827 !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
}

.pagination-buttons a:hover {
    background: #dfe3e8 !important;
}

.pagination-buttons .active-page {
    background: #7c6aa6 !important;
    color: #ffffff !important;
    border: 0 !important;
}

.pagination-buttons .active-page:hover {
    background: #6f5f96 !important;
}
