/* ==========================================================================
   Vivendi ServiceTool – Argon-inspiriertes Theme (V2)
   ========================================================================== */

:root {
    --st-primary: #5e72e4;
    --st-primary-dark: #324cdd;
    --st-success: #2dce89;
    --st-info: #11cdef;
    --st-warning: #fb6340;
    --st-danger: #f5365c;
    --st-default: #172b4d;
    --st-gray-100: #f6f9fc;
    --st-gray-200: #e9ecef;
    --st-gray-300: #dee2e6;
    --st-gray-500: #adb5bd;
    --st-gray-600: #8898aa;
    --st-gray-700: #525f7f;
    --st-gray-800: #32325d;
    --st-gradient-primary: linear-gradient(87deg, #5e72e4 0, #825ee4 100%);
    --st-gradient-success: linear-gradient(87deg, #2dce89 0, #2dcecc 100%);
    --st-gradient-info: linear-gradient(87deg, #11cdef 0, #1171ef 100%);
    --st-gradient-warning: linear-gradient(87deg, #fb6340 0, #fbb140 100%);
    --st-gradient-danger: linear-gradient(87deg, #f5365c 0, #f56036 100%);
    --st-gradient-default: linear-gradient(87deg, #172b4d 0, #1a174d 100%);
    --st-shadow-sm: 0 0 1rem 0 rgba(136, 152, 170, .075);
    --st-shadow: 0 0 2rem 0 rgba(136, 152, 170, .15);
    --st-shadow-lg: 0 1rem 3rem rgba(31, 45, 61, .125);
    --st-radius: .375rem;
    --st-radius-lg: .75rem;
    --st-sidebar-width: 250px;
}

/* ----- Base reset ----- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
    background-color: var(--st-gray-100);
    color: var(--st-gray-700);
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: .875rem;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--st-gray-800);
    font-weight: 600;
    letter-spacing: -0.01em;
}

a { color: var(--st-primary); text-decoration: none; }
a:hover { color: var(--st-primary-dark); }

/* ----- Sidebar ----- */
.st-sidenav {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--st-sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--st-gray-200);
    box-shadow: 0 0 2rem 0 rgba(136, 152, 170, .05);
    overflow-y: auto;
    z-index: 1040;
    transition: transform .3s ease;
}

.st-sidenav-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--st-gray-200);
    color: var(--st-gray-800);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
}
.st-sidenav-brand:hover { color: var(--st-primary); }
.st-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: .5rem;
    background: var(--st-gradient-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--st-shadow-sm);
    flex-shrink: 0;
}

.st-sidenav-section {
    padding: 1rem 1.5rem .35rem;
    color: var(--st-gray-500);
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.st-sidenav .nav {
    padding: 0 .75rem 1rem;
    list-style: none;
    margin: 0;
}
.st-sidenav .nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .85rem;
    margin-bottom: .15rem;
    color: var(--st-gray-700);
    font-weight: 500;
    font-size: .85rem;
    border-radius: var(--st-radius);
    transition: background .15s, color .15s;
}
.st-sidenav .nav-link i {
    font-size: 1rem;
    color: var(--st-gray-500);
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}
.st-sidenav .nav-link:hover {
    background: var(--st-gray-100);
    color: var(--st-primary);
}
.st-sidenav .nav-link:hover i { color: var(--st-primary); }
.st-sidenav .nav-link.active {
    color: var(--st-primary);
    background: rgba(94, 114, 228, .10);
}
.st-sidenav .nav-link.active i { color: var(--st-primary); }

/* Sidebar mobile */
.st-sidenav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 1039;
    display: none;
}
@media (max-width: 991.98px) {
    .st-sidenav { transform: translateX(-100%); }
    .st-sidenav.show { transform: translateX(0); }
    .st-sidenav-backdrop.show { display: block; }
}

/* ----- Main column (only when sidebar is present) ----- */
.has-sidenav .st-main {
    margin-left: var(--st-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
@media (max-width: 991.98px) {
    .has-sidenav .st-main { margin-left: 0; }
}

/* When no sidebar (login etc) – just block layout */
body:not(.has-sidenav) .st-main {
    min-height: 100vh;
}

/* ----- Hero (Topnav + Title share gradient bg) ----- */
.st-hero {
    background: var(--st-gradient-default);
    color: #fff;
    position: relative;
    padding-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(50, 50, 93, .08);
}
.st-hero-topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.75rem;
    color: #fff;
    flex-wrap: wrap;
    gap: 1rem;
}
.st-toggle-sidebar {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 1.4rem;
    padding: 0;
    line-height: 1;
    display: none;
}
@media (max-width: 991.98px) {
    .st-toggle-sidebar { display: inline-block; }
}
.st-page-breadcrumb {
    font-size: .8rem;
    color: rgba(255, 255, 255, .65);
    font-weight: 500;
}
.st-page-breadcrumb a { color: rgba(255, 255, 255, .9); }
.st-page-breadcrumb a:hover { color: #fff; }

.st-user {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: rgba(255, 255, 255, .92);
    font-weight: 500;
    font-size: .85rem;
}
.st-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}
.btn-logout {
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    padding: .35rem .85rem;
    border-radius: var(--st-radius);
    font-size: .8rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s;
}
.btn-logout:hover {
    background: rgba(255, 255, 255, .28);
    color: #fff;
}

.st-hero-title {
    padding: .5rem 1.75rem 1rem;
    max-width: 1320px;
    margin: 0 auto;
}
.st-hero-title h1 {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0 0 .35rem;
}
.st-hero-title p {
    color: rgba(255, 255, 255, .8);
    margin: 0;
    font-size: .9rem;
}

/* ----- Content ----- */
.st-content {
    padding: 1.75rem 1.75rem 2rem;
    flex: 1;
}
.st-content-inner {
    max-width: 1320px;
    margin: 0 auto;
    width: 100%;
}

/* ----- Cards ----- */
.card {
    border: 0;
    border-radius: var(--st-radius-lg);
    box-shadow: var(--st-shadow);
    background: #fff;
    margin-bottom: 1.5rem;
}
.card-header {
    background: #fff;
    border-bottom: 1px solid var(--st-gray-200);
    padding: 1.15rem 1.5rem;
    font-weight: 600;
    color: var(--st-gray-800);
    border-top-left-radius: var(--st-radius-lg) !important;
    border-top-right-radius: var(--st-radius-lg) !important;
}
.card-body { padding: 1.5rem; }
.card-footer {
    background: #fff;
    border-top: 1px solid var(--st-gray-200);
    padding: 1rem 1.5rem;
    border-bottom-left-radius: var(--st-radius-lg) !important;
    border-bottom-right-radius: var(--st-radius-lg) !important;
}

/* ----- Stat-Card ----- */
.st-stat-card {
    border: 0;
    border-radius: var(--st-radius-lg);
    background: #fff;
    box-shadow: var(--st-shadow);
    padding: 1.25rem 1.5rem;
    height: 100%;
}
.st-stat-label {
    color: var(--st-gray-600);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .15rem;
}
.st-stat-value {
    color: var(--st-gray-800);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: .15rem;
}
.st-stat-meta {
    color: var(--st-gray-600);
    font-size: .75rem;
}
.st-stat-meta .up   { color: var(--st-success); font-weight: 600; }
.st-stat-meta .down { color: var(--st-danger);  font-weight: 600; }
.st-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--st-shadow-sm);
    flex-shrink: 0;
}
.st-icon-primary  { background: var(--st-gradient-primary); }
.st-icon-success  { background: var(--st-gradient-success); }
.st-icon-info     { background: var(--st-gradient-info); }
.st-icon-warning  { background: var(--st-gradient-warning); }
.st-icon-danger   { background: var(--st-gradient-danger); }
.st-icon-default  { background: var(--st-gradient-default); }

/* ----- Buttons ----- */
.btn {
    font-weight: 600;
    font-size: .8rem;
    letter-spacing: .025em;
    border-radius: var(--st-radius);
    padding: .5rem 1rem;
    transition: all .15s ease;
}
.btn-sm { padding: .35rem .75rem; font-size: .75rem; }
.btn-lg { padding: .75rem 1.5rem; font-size: .9rem; }

.btn-primary { background: var(--st-primary); border-color: var(--st-primary); }
.btn-primary:hover, .btn-primary:focus {
    background: var(--st-primary-dark);
    border-color: var(--st-primary-dark);
    box-shadow: 0 4px 6px rgba(50, 50, 93, .11), 0 1px 3px rgba(0, 0, 0, .08);
}
.btn-outline-primary { color: var(--st-primary); border-color: var(--st-primary); }
.btn-outline-primary:hover { background: var(--st-primary); border-color: var(--st-primary); color: #fff; }
.btn-outline-secondary {
    color: var(--st-gray-700);
    border-color: var(--st-gray-300);
    background: #fff;
}
.btn-outline-secondary:hover {
    background: var(--st-gray-100);
    color: var(--st-gray-800);
    border-color: var(--st-gray-300);
}

/* ----- Badges ----- */
.badge {
    font-weight: 600;
    font-size: .65rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .35em .65em;
    border-radius: var(--st-radius);
}

/* ----- Tables ----- */
.table { color: var(--st-gray-700); font-size: .85rem; }
.table thead th {
    background: var(--st-gray-100);
    color: var(--st-gray-600);
    font-weight: 600;
    text-transform: uppercase;
    font-size: .65rem;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--st-gray-200);
    padding: .85rem 1.5rem;
}
.table tbody td {
    padding: .9rem 1.5rem;
    border-top: 1px solid var(--st-gray-200);
    vertical-align: middle;
}
.table-hover tbody tr:hover { background: var(--st-gray-100); }

/* ----- Forms ----- */
.form-label {
    color: var(--st-gray-700);
    font-weight: 600;
    font-size: .8rem;
    margin-bottom: .35rem;
}
.form-control, .form-select {
    border: 1px solid var(--st-gray-300);
    border-radius: var(--st-radius);
    padding: .55rem .85rem;
    font-size: .85rem;
    color: var(--st-gray-800);
    box-shadow: none;
}
.form-control:focus, .form-select:focus {
    border-color: var(--st-primary);
    box-shadow: 0 0 0 .15rem rgba(94, 114, 228, .15);
}
.input-group-text {
    background: var(--st-gray-100);
    border: 1px solid var(--st-gray-300);
    color: var(--st-gray-700);
    font-size: .85rem;
}

/* ----- Alerts ----- */
.alert {
    border: 0;
    border-radius: var(--st-radius);
    padding: .85rem 1.15rem;
    font-size: .85rem;
    font-weight: 500;
}
.alert-success { background: rgba(45, 206, 137, .12); color: #1f7f56; }
.alert-danger  { background: rgba(245, 54, 92, .12);  color: #b3204a; }
.alert-warning { background: rgba(251, 99, 64, .12);  color: #c14123; }
.alert-info    { background: rgba(17, 205, 239, .12); color: #0d8ba4; }

/* ----- List Group ----- */
.list-group-item {
    border-color: var(--st-gray-200);
    color: var(--st-gray-700);
    padding: 1rem 1.5rem;
    font-size: .85rem;
}
.list-group-item-action:hover { background: var(--st-gray-100); }

/* ----- Dropdown ----- */
.dropdown-menu {
    border: 0;
    box-shadow: var(--st-shadow);
    border-radius: var(--st-radius);
    padding: .5rem;
    font-size: .85rem;
}
.dropdown-item {
    border-radius: var(--st-radius);
    padding: .5rem .75rem;
    color: var(--st-gray-700);
}
.dropdown-item:hover, .dropdown-item.active {
    background: var(--st-gray-100);
    color: var(--st-primary);
}

/* ----- Tabs ----- */
.nav-tabs {
    border-bottom: 1px solid var(--st-gray-200);
}
.nav-tabs .nav-link {
    color: var(--st-gray-600);
    border: 0;
    border-bottom: 2px solid transparent;
    font-weight: 600;
    padding: .75rem 1.25rem;
    background: transparent;
}
.nav-tabs .nav-link.active {
    color: var(--st-primary);
    background: transparent;
    border-bottom-color: var(--st-primary);
}

/* ----- Footer ----- */
.st-footer {
    padding: 1.25rem 1.75rem;
    color: var(--st-gray-600);
    font-size: .8rem;
    background: transparent;
    margin-top: auto;
}
.st-footer a { color: var(--st-gray-700); }

/* ----- Login (no sidebar) ----- */
.st-login-shell {
    min-height: 100vh;
    background: var(--st-gradient-default);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    overflow: hidden;
}
.st-login-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(94, 114, 228, .55), transparent 60%);
    pointer-events: none;
}
.st-login-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: var(--st-radius-lg);
    box-shadow: var(--st-shadow-lg);
    padding: 2.5rem 2.5rem 2rem;
    position: relative;
    z-index: 1;
}
.st-login-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: .85rem;
    background: var(--st-gradient-primary);
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--st-shadow);
}

/* ----- Utility ----- */
.text-muted { color: var(--st-gray-600) !important; }
.fw-semibold { font-weight: 600 !important; }
hr { border-color: var(--st-gray-200); opacity: 1; }

.st-sidenav::-webkit-scrollbar { width: 6px; }
.st-sidenav::-webkit-scrollbar-thumb { background: var(--st-gray-300); border-radius: 3px; }
