/*
 * Khimbus Admin Module - Dedicated Modern Stylesheet
 * Scoped styling for Admin portal dashboards, tables, cards, and forms
 */

/* General & Layout */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #2d3748;
    background-color: #f7fafc;
}

/* Navbar */
.site-header .navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.site-header .navbar-brand {
    display: flex;
    align-items: center;
}

.site-header .navbar-nav .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease-in-out;
}

.site-header .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    margin-top: 0;
}

.site-header .navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    border-bottom: none;
    margin-top: 0;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, #3d5a80 0%, #293241 100%);
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.06);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar h4 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 1rem;
    margin-bottom: 1rem;
}

.sidebar-link-wrapper .btn {
    display: block;
    width: calc(100% - 1.5rem);
    margin: 0.25rem 0.75rem;
    padding: 0.5rem 0.85rem;
    color: #e2e8f0 !important;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    border-radius: 0.35rem;
    border: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar-link-wrapper .btn:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    margin-left: 0.75rem;
    transform: translateX(3px);
}

.sidebar-link-wrapper .btn.sidebar-active {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    border-left: 3px solid #63b3ed;
    font-weight: 600;
}

/* Cards & Panels */
.card {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s ease-in-out;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
}

.card-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

/* Dashboard Action Cards */
.admin-feature-card {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
    height: 100%;
}

.admin-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.admin-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

/* Avatars */
.admin-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-avatar-lg {
    width: 72px;
    height: 72px;
    font-size: 1.6rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8fafc;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
    border-top: none;
    vertical-align: middle;
}

.table tbody td {
    vertical-align: middle;
    font-size: 0.95rem;
    border-color: #edf2f7;
}

.table-hover tbody tr:hover {
    background-color: #f7fafc;
}

tr.clickable-row {
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

/* Breadcrumbs */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.breadcrumb-item a {
    color: #4a5568;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #2b6cb0;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #718096;
}

/* Badges */
.badge-pill-status {
    padding: 0.35em 0.85em;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50rem;
}

/* Preformatted Stack Traces & Results */
.admin-job-log {
    background-color: #1a202c;
    color: #e2e8f0;
    border-radius: 0.35rem;
    padding: 0.75rem;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.82rem;
    white-space: pre-wrap;
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 0;
}

/* Login Card Layout */
.admin-login-wrapper {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-login-card {
    width: 100%;
    max-width: 440px;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    background-color: #ffffff;
}

/* Form Styling */
.form-control:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 0.2rem rgba(66, 153, 225, 0.25);
}

.input-group-text {
    background-color: #f7fafc;
    border-color: #cbd5e0;
    color: #718096;
}
