:root {
    /* 60-30-10 Rule Palette */
    /* 60% Dominant: Backgrounds */
    --color-bg-body: #f4f6f9;
    --color-bg-card: #ffffff;

    /* 30% Secondary: Sidebar, Text */
    --color-sidebar-dark: #343a40;
    --color-text-primary: #212529;
    --color-text-secondary: #6c757d;
    --color-text-light: #c2c7d0;
    /* For dark backgrounds */

    /* 10% Accent: Actions, States */
    --color-primary: #007bff;
    --color-primary-hover: #0056b3;
    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-danger: #dc3545;
    --color-info: #17a2b8;

    /* Spacing & Borders */
    --border-radius: 0.25rem;
    --box-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, .2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--color-bg-body);
    color: var(--color-text-primary);
    line-height: 1.5;
    font-size: 1rem;
    height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--color-primary);
    transition: color 0.3s;
}

a:hover {
    color: var(--color-primary-hover);
}

/* --- LAYOUT STRUCTURE (AdminLTE Style) --- */

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
.main-header {
    background-color: var(--color-bg-card);
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 250px;
    /* Sidebar width */
    transition: margin-left 0.3s ease-in-out;
}

.navbar-nav {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-item {
    margin-left: 1rem;
}

/* Sidebar */
.main-sidebar {
    background-color: var(--color-sidebar-dark);
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    transition: width 0.3s ease-in-out;
    z-index: 1038;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .25), 0 10px 10px rgba(0, 0, 0, .22);
}

.brand-link {
    display: block;
    padding: 0.8125rem 0.5rem;
    font-size: 1.25rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, .8);
    border-bottom: 1px solid #4b545c;
    text-align: center;
    font-weight: 300;
}

.brand-link:hover {
    color: #fff;
}

.sidebar {
    padding: 0 0.5rem;
}

.user-panel {
    padding: 1rem 0.5rem;
    border-bottom: 1px solid #4b545c;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.user-panel .image {
    margin-right: 10px;
}

.user-panel .image i {
    color: #fff;
    font-size: 1.5rem;
    background: #6c757d;
    padding: 8px;
    border-radius: 50%;
}

.user-panel .info a {
    color: #c2c7d0;
    display: block;
}

.nav-sidebar {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav-sidebar .nav-item {
    margin: 0;
    margin-bottom: 0.2rem;
}

.nav-sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #c2c7d0;
    border-radius: var(--border-radius);
}

.nav-sidebar .nav-link i {
    margin-right: 0.8rem;
    width: 1.6rem;
    text-align: center;
}

.nav-sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, .1);
    color: #fff;
}

.nav-sidebar .nav-link.active {
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24);
}

/* Content Wrapper */
.content-wrapper {
    background-color: var(--color-bg-body);
    margin-left: 250px;
    padding: 1.5rem;
    min-height: calc(100vh - 57px);
    /* Minus footer/header approx */
    transition: margin-left 0.3s ease-in-out;
}

.content-header {
    padding: 15px 0.5rem;
    margin-bottom: 1rem;
}

.content-header h1 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--color-text-primary);
}

/* Footer */
.main-footer {
    background-color: var(--color-bg-card);
    border-top: 1px solid #dee2e6;
    padding: 1rem;
    color: #869099;
    margin-left: 250px;
    transition: margin-left 0.3s ease-in-out;
}

/* --- COMPONENTS --- */

/* Cards */
.card {
    background-color: var(--color-bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1rem;
    border: 0 solid rgba(0, 0, 0, .125);
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, .125);
    padding: 0.75rem 1.25rem;
    position: relative;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

/* Info Boxes */
.info-box {
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    background-color: #fff;
    display: flex;
    margin-bottom: 1rem;
    min-height: 80px;
    padding: .5rem;
    position: relative;
    width: 100%;
}

.info-box-icon {
    border-radius: var(--border-radius);
    align-items: center;
    display: flex;
    font-size: 1.875rem;
    justify-content: center;
    text-align: center;
    width: 70px;
    color: #fff;
}

.info-box-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.8;
    flex: 1;
    padding: 0 10px;
}

.info-box-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    font-size: 14px;
}

.info-box-number {
    display: block;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* Background Colors for Icons/Badges */
.bg-info {
    background-color: var(--color-info) !important;
}

.bg-success {
    background-color: var(--color-success) !important;
}

.bg-warning {
    background-color: var(--color-warning) !important;
    color: #1f2d3d !important;
}

.bg-danger {
    background-color: var(--color-danger) !important;
}

.bg-primary {
    background-color: var(--color-primary) !important;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--border-radius);
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn-danger {
    color: #fff;
    background-color: var(--color-danger);
    border-color: var(--color-danger);
}

.btn-success {
    color: #fff;
    background-color: var(--color-success);
    border-color: var(--color-success);
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
    background-color: transparent;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    color: var(--color-text-secondary);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, .05);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, .075);
}

/* Forms */
.form-control {
    display: block;
    width: 100%;
    height: calc(2.25rem + 2px);
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

/* Utilities */
.text-muted {
    color: var(--color-text-secondary) !important;
}

.float-right {
    float: right !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}