* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background: #f4f6f8;
    color: #1f2a38;
}

.login-screen {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1b2733, #375a7f);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.login-logo {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
}

.login-box h2 {
    margin-bottom: 20px;
    font-size: 18px;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.login-box .hint {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

.error-msg {
    background: #fdecea;
    color: #c0392b;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 13px;
}

.topbar {
    background: #1b2733;
    color: #cfd8e3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.logo {
    font-weight: bold;
    font-size: 16px;
    color: white;
    white-space: nowrap;
}

#mainNav {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}

.nav-btn {
    background: none;
    border: none;
    color: #9fb0c3;
    padding: 18px 11px;
    cursor: pointer;
    font-size: 13.5px;
    border-bottom: 3px solid transparent;
}

.nav-btn:hover {
    color: white;
}

.nav-btn.active {
    color: white;
    border-bottom: 3px solid #4ca1af;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    white-space: nowrap;
}

.btn-link {
    background: none;
    border: 1px solid #445566;
    color: #cfd8e3;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.hamburger {
    display: none;
    position: fixed;
    top: 14px;
    right: 15px;
    z-index: 200;
    background: #1b2733;
    color: white;
    border: none;
    font-size: 20px;
    padding: 4px 10px;
    border-radius: 4px;
}

.content {
    max-width: 1350px;
    margin: 0 auto;
    padding: 25px 20px;
}

.page-title {
    font-size: 24px;
    margin-bottom: 18px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.page-head h1 {
    font-size: 22px;
}

.count-badge {
    font-size: 15px;
    font-weight: normal;
    color: #888;
}

.sub-text {
    color: #777;
    font-size: 13px;
    margin-bottom: 15px;
}

.tab-section {
    display: none;
}

.tab-section.active {
    display: block;
}

.sub-section {
    display: none;
}

.sub-section.active {
    display: block;
}

.sub-nav {
    display: flex;
    gap: 5px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.sub-nav-btn {
    background: none;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    color: #666;
    border-bottom: 2px solid transparent;
}

.sub-nav-btn.active {
    color: #1b2733;
    border-bottom: 2px solid #4ca1af;
    font-weight: 600;
}

.btn {
    padding: 9px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 13.5px;
}

.btn-primary {
    background: #1b2733;
    color: white;
}

.btn-primary:hover {
    background: #324860;
}

.btn-outline {
    background: white;
    border: 1px solid #ccc;
    color: #333;
}

.btn-outline:hover {
    background: #f0f0f0;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
    margin-right: 5px;
}

.full {
    width: 100%;
}

.stat-cards {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.stat-card {
    flex: 1;
    min-width: 150px;
    background: white;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #ccc;
}

.stat-card h2 {
    font-size: 28px;
}

.stat-card p {
    font-size: 12.5px;
    color: #777;
    margin-top: 4px;
}

.stat-card.green {
    border-top-color: #27ae60;
}

.stat-card.orange {
    border-top-color: #e67e22;
}

.stat-card.red {
    border-top-color: #e74c3c;
}

.stat-card.gray {
    border-top-color: #95a5a6;
}

.stat-card.blue {
    border-top-color: #375a7f;
}

.combo-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: #eee;
    margin-bottom: 6px;
}

.combo-caption {
    font-size: 13px;
    color: #555;
    margin-bottom: 25px;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media(max-width:900px) {
    .two-col {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.panel h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.filter-grid label {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

.filter-grid select,
.filter-grid input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
}

input,
select,
textarea {
    font-family: inherit;
}

#assetSearch,
#peopleSearch,
#gpSearch {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13.5px;
}

.run-item {
    margin-bottom: 14px;
}

.run-item-top {
    font-size: 14px;
    margin-bottom: 5px;
}

.run-item-top .name {
    font-weight: 600;
}

.run-item-top .sub {
    color: #888;
    font-size: 12px;
    display: block;
}

.mini-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    flex: 1;
    margin: 0 10px;
}

.mini-bar-row {
    display: flex;
    align-items: center;
}

.mini-bar span {
    height: 100%;
    display: block;
}

.days-left {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
}

.where-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
}

.where-item .label {
    width: 120px;
    color: #375a7f;
}

.where-bar-bg {
    flex: 1;
    background: #eee;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.where-bar-fill {
    height: 100%;
    background: #375a7f;
}

.where-count {
    width: 35px;
    text-align: right;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 10px 9px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    text-align: left;
}

.data-table th {
    background: #f7f9fb;
    color: #555;
    font-weight: 600;
}

.data-table tr:hover {
    background: #fafbfc;
}

.badge {
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    color: white;
    display: inline-block;
}

.badge.active {
    background: #27ae60;
}

.badge.expiring {
    background: #e67e22;
}

.badge.out {
    background: #e74c3c;
}

.badge.no_info {
    background: #95a5a6;
}

.badge.disposed {
    background: #555;
}

.badge.outside {
    background: #e67e22;
}

.badge.returned {
    background: #27ae60;
}

.badge.role-admin {
    background: #c0392b;
}

.badge.role-groupadmin {
    background: #e67e22;
}

.badge.role-user {
    background: #375a7f;
}

.badge.role-viewer {
    background: #7f8c8d;
}

.mini-progress {
    width: 70px;
    height: 5px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

.mini-progress span {
    display: block;
    height: 100%;
}

.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
}

.pagination button.active {
    background: #1b2733;
    color: white;
    border-color: #1b2733;
}

.report-summary {
    background: #375a7f;
    color: white;
    border-radius: 10px;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.report-summary .main-num {
    font-size: 40px;
    font-weight: bold;
}

.report-summary .sub {
    font-size: 12px;
    opacity: 0.85;
    max-width: 280px;
}

.report-summary .side-num {
    font-size: 22px;
    font-weight: bold;
}

.report-summary .side {
    text-align: right;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.cat-card {
    background: white;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.cat-card .top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cat-card .top b {
    font-size: 20px;
}

.cat-card .sub {
    font-size: 11.5px;
    color: #888;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.role-grid ul {
    margin-top: 8px;
    padding-left: 18px;
    font-size: 13px;
    color: #555;
}

.role-grid li {
    margin-bottom: 4px;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: white;
    width: 460px;
    max-width: 92vw;
    border-radius: 10px;
    max-height: 88vh;
    overflow-y: auto;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
}

.modal-body label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
    margin-top: 12px;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.modal-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f4f6f8;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12.5px;
    width: auto;
}

.checkbox-list input {
    width: auto;
}

@media(max-width:860px) {
    #mainNav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: #1b2733;
        flex-direction: column;
    }

    #mainNav.open {
        display: flex;
    }

    .nav-btn {
        text-align: left;
        padding: 14px 20px;
        border-bottom: 1px solid #2c3e50;
    }

    .hamburger {
        display: block;
    }
}