/* Scale2World Application Inventory Portal Styles */

html, body.inv-portal-body {
    margin: 0;
    padding: 0;
    height: auto;
    min-height: 100%;
    background: #f4f6f9;
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #333;
}

/* ===== Fixed top header ===== */
.inv-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: linear-gradient(135deg, #1a5276 0%, #2e86c1 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin: 0;
    border: none;
}

.inv-topbar-left,
.inv-topbar-right {
    display: flex;
    align-items: center;
    height: 56px;
}

.inv-topbar-left {
    flex: 1;
    min-width: 0;
    gap: 12px;
}

.inv-topbar-right {
    flex-shrink: 0;
    margin-left: 20px;
}

.inv-sidebar-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.inv-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.inv-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100vw - 280px);
}

.inv-brand:hover,
.inv-brand:focus {
    color: #fff !important;
    text-decoration: none !important;
}

.inv-brand-logo-inline {
    height: 38px;
    width: 38px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    padding: 3px;
    flex-shrink: 0;
}

.inv-user-menu {
    position: relative;
}

.inv-user-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff !important;
    text-decoration: none !important;
    padding: 8px 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.inv-user-toggle:hover,
.inv-user-toggle:focus {
    background: rgba(255, 255, 255, 0.22);
    color: #fff !important;
    text-decoration: none !important;
}

.inv-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.inv-user-name {
    font-weight: 600;
    font-size: 13px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inv-role-badge {
    font-size: 10px;
    margin-left: 2px;
    vertical-align: middle;
}

/* ===== Page layout ===== */
.inv-page-container {
    display: flex;
    align-items: stretch;
    padding-top: 56px;
    min-height: 100vh;
    background: #f4f6f9;
    margin: 0;
    transition: all 0.25s ease;
}

.inv-sidebar-wrap {
    width: 220px;
    flex: 0 0 220px;
    background: #2c3e50;
    padding: 0;
    min-height: calc(100vh - 56px);
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1020;
    transition: transform 0.25s ease, width 0.25s ease;
}

.inv-sidebar-wrap.collapsed {
    transform: translateX(-220px);
}

.inv-main-content {
    flex: 1;
    padding: 20px;
    min-width: 0;
    margin-left: 220px;
    transition: margin-left 0.25s ease;
}

.inv-sidebar-collapsed .inv-main-content {
    margin-left: 0;
}

.inv-sidebar-overlay {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1015;
}

.inv-sidebar-open .inv-sidebar-overlay {
    display: block;
}

.inv-sidebar-open .inv-sidebar-wrap {
    transform: translateX(0);
}

.inv-sidebar-open.inv-sidebar-collapsed .inv-sidebar-wrap.collapsed {
    transform: translateX(0);
}

.inv-brand-logo {
    text-align: center;
    margin-bottom: 15px;
}

.inv-brand-logo .inv-logo-img {
    max-width: 120px;
    height: auto;
}

.inv-login-box .inv-brand-logo .inv-logo-img {
    max-width: 140px;
}

.inv-portal-footer {
    text-align: center;
    padding: 14px 10px;
    margin-top: 20px;
    color: #7f8c8d;
    font-size: 12px;
    border-top: 1px solid #e0e0e0;
    background: #fff;
}

.inv-login-page .inv-portal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 0;
}

.inv-portal-body .inv-page-container {
    padding-bottom: 10px;
}

.inv-sidebar {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.inv-sidebar li a {
    display: block;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.inv-sidebar li a i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

.inv-sidebar li.active a,
.inv-sidebar li a:hover {
    background: #34495e;
    color: #fff;
    border-left-color: #3498db;
    text-decoration: none;
}

.inv-title-bar {
    background: linear-gradient(135deg, #1a5276, #2e86c1);
    color: #fff;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.inv-stat-box {
    background: #fff;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.inv-stat-box .stat-num {
    font-size: 32px;
    font-weight: bold;
    color: #2e86c1;
}

.inv-stat-box .stat-label {
    color: #7f8c8d;
    font-size: 13px;
    margin-top: 5px;
}

.inv-table-wrap {
    background: #fff;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.inv-table-wrap table th {
    background: #ecf0f1;
    font-weight: 600;
}

.inv-btn-primary {
    background: #2e86c1;
    border-color: #1a5276;
    color: #fff;
}

.inv-btn-primary:hover,
.inv-btn-primary:focus {
    background: #1a5276;
    color: #fff;
}

.inv-section-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 15px;
    height: auto;
    min-height: 0;
}

.inv-section-box h4 {
    margin-top: 0;
    color: #1a5276;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.inv-section-box .form-group {
    margin-bottom: 15px;
}

.inv-section-box label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #444;
}

.inv-section-box .row {
    margin-left: -15px;
    margin-right: -15px;
}

.inv-section-box .row + .row,
.inv-section-box .form-group {
    clear: both;
}

.inv-login-page {
    background: linear-gradient(135deg, #1a5276 0%, #2e86c1 50%, #5dade2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inv-login-box {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.inv-login-box h1 {
    text-align: center;
    color: #1a5276;
    font-size: 20px;
    margin-bottom: 8px;
    margin-top: 0;
}

.has-error { color: #e74c3c; font-size: 12px; }

.cred-mask { font-family: monospace; letter-spacing: 2px; }

.inv-portal-body .alert {
    margin-bottom: 15px;
}

.inv-portal-body .help-block {
    font-size: 12px;
    color: #777;
    margin-top: 5px;
}

@media (max-width: 992px) {
    .inv-brand-text {
        display: none;
    }
    .inv-user-name {
        max-width: 100px;
    }
    .inv-main-content {
        margin-left: 0 !important;
        padding: 15px;
    }
    .inv-sidebar-wrap {
        width: 260px;
        flex: 0 0 260px;
        transform: translateX(-260px);
    }
    .inv-sidebar-wrap.collapsed {
        transform: translateX(-260px);
    }
    .inv-sidebar-open .inv-sidebar-wrap {
        transform: translateX(0);
    }
}
