/* ==========================================================================
   ETIKAS Nexus — theme layer
   Loaded after assets/css/app.min.css to refine the base admin template:
   typography, spacing, color, elevation, and component polish. Class names
   from the template (btn, card, form-control, vertical-menu, etc.) are kept
   so existing markup keeps working; this file only restyles them.
   ========================================================================== */

:root {
    --brand: #556ee6;
    --brand-dark: #3f52c9;
    --brand-soft: #eef1fd;

    --ink: #32394e;
    --ink-muted: #74788d;
    --surface: #ffffff;
    --page-bg: #f4f6fb;
    --border: #e7eaf3;

    --radius-sm: 0.5rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;

    --shadow-sm: 0 1px 2px rgba(50, 57, 78, 0.06);
    --shadow: 0 6px 16px -4px rgba(50, 57, 78, 0.1), 0 2px 6px -2px rgba(50, 57, 78, 0.06);
    --shadow-lg: 0 20px 40px -12px rgba(50, 57, 78, 0.18);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------------------------------------------------------------------- */
/* Base */
/* ---------------------------------------------------------------------- */

body {
    font-family: var(--font-sans);
    color: var(--ink);
    background-color: var(--page-bg);
    -webkit-font-smoothing: antialiased;
}

.page-content {
    background-color: var(--page-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    color: var(--ink);
    font-weight: 600;
}

a {
    transition: color .15s ease-in-out;
}

::selection {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

/* Slim, unobtrusive scrollbars for the sidebar / scroll containers */
[data-simplebar] .simplebar-scrollbar::before,
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background: rgba(50, 57, 78, 0.18);
    border-radius: 999px;
}

/* ---------------------------------------------------------------------- */
/* Page header (breadcrumb block used by _page_title.cshtml) */
/* ---------------------------------------------------------------------- */

.page-title-box h4 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.page-title-box .breadcrumb {
    background: transparent;
}

/* ---------------------------------------------------------------------- */
/* Cards */
/* ---------------------------------------------------------------------- */

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
}

.card-body {
    padding: 1.5rem;
}

.card.card-hover:hover,
a.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card-title {
    font-weight: 600;
}

/* ---------------------------------------------------------------------- */
/* Buttons */
/* ---------------------------------------------------------------------- */

.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: filter .15s ease, transform .05s ease, box-shadow .15s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--brand);
    border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    box-shadow: 0 4px 10px rgba(85, 110, 230, 0.35);
}

.btn-light {
    background-color: #fff;
    border-color: var(--border);
    color: var(--ink);
}

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}

.btn-outline-primary:hover {
    background-color: var(--brand);
    border-color: var(--brand);
}

.btn-icon-tile {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------------- */
/* Forms */
/* ---------------------------------------------------------------------- */

.form-label {
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border-color: var(--border);
    padding: 0.55rem 0.9rem;
    color: var(--ink);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(85, 110, 230, 0.15);
}

.form-control::placeholder {
    color: #a6acc2;
}

.form-text,
.text-muted {
    color: var(--ink-muted) !important;
}

.field-validation-error,
.text-danger {
    font-weight: 500;
}

.form-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: var(--surface);
    margin-bottom: 1.5rem;
}

.form-section + .form-section {
    margin-top: 1.5rem;
}

.form-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
    margin-bottom: 1.1rem;
}

/* Hide validation summaries automatically when there is nothing to show,
   both on initial render and after jquery.validate.unobtrusive toggles
   these classes client-side. */
.validation-summary-valid {
    display: none;
}

.validation-summary-errors ul {
    margin-bottom: 0;
    padding-left: 1.1rem;
}

/* ---------------------------------------------------------------------- */
/* Alerts */
/* ---------------------------------------------------------------------- */

.alert {
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    margin-bottom: 1.25rem;
}

.alert-success {
    background-color: rgba(52, 195, 143, 0.12);
    border-color: rgba(52, 195, 143, 0.3);
    color: #2c9d76;
}

.alert-danger {
    background-color: rgba(244, 106, 106, 0.1);
    border-color: rgba(244, 106, 106, 0.28);
    color: #e05252;
}

/* ---------------------------------------------------------------------- */
/* Tabs */
/* ---------------------------------------------------------------------- */

.nav-pills .nav-link {
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--ink-muted);
}

.nav-pills .nav-link.active {
    background-color: var(--brand);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.tab-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}

.nav-pills.nav-justified {
    background: #fff;
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    gap: 0.25rem;
}

/* ---------------------------------------------------------------------- */
/* Tables */
/* ---------------------------------------------------------------------- */

.table {
    color: var(--ink);
}

.table > :not(caption) > * > * {
    padding: 0.85rem 1rem;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(85, 110, 230, 0.03);
}

.detail-table td:first-child {
    color: var(--ink-muted);
    font-weight: 500;
    width: 45%;
}

.detail-table td:last-child {
    font-weight: 500;
}

/* ---------------------------------------------------------------------- */
/* Password reveal control */
/* ---------------------------------------------------------------------- */

.password-reveal {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.password-reveal-value {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.password-reveal-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.password-reveal-toggle:hover {
    color: var(--brand);
    border-color: var(--brand);
    background: var(--brand-soft);
}

.password-reveal-toggle:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
}

.password-reveal-toggle[aria-pressed="true"] {
    color: var(--brand-dark);
    border-color: var(--brand);
    background: var(--brand-soft);
}

/* Password input show/hide toggle (Create/Edit forms) */

.password-input-wrap {
    position: relative;
}

.password-input-wrap .form-control {
    padding-right: 2.75rem;
}

.password-input-toggle {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--ink-muted);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
}

.password-input-toggle:hover {
    color: var(--brand);
    background: var(--brand-soft);
}

.password-input-toggle:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
}

/* ---------------------------------------------------------------------- */
/* Delete confirmation (SweetAlert2) */
/* ---------------------------------------------------------------------- */

.swal2-popup {
    border-radius: var(--radius-lg) !important;
    font-family: var(--font-sans) !important;
}

.swal2-title {
    font-size: 1.25rem !important;
    color: var(--ink) !important;
}

.swal2-html-container {
    color: var(--ink-muted) !important;
}

.swal2-styled.swal2-confirm {
    border-radius: var(--radius-sm) !important;
    font-weight: 500 !important;
}

.swal2-styled.swal2-cancel {
    border-radius: var(--radius-sm) !important;
    font-weight: 500 !important;
}

/* ---------------------------------------------------------------------- */
/* Topbar */
/* ---------------------------------------------------------------------- */

#page-topbar {
    box-shadow: 0 1px 0 rgba(50, 57, 78, 0.06), 0 4px 12px rgba(50, 57, 78, 0.04);
}

.navbar-brand-box {
    background-color: #fff !important;
    border-right: 1px solid var(--border);
}

.header-item {
    color: var(--ink-muted);
}

.header-item:hover {
    color: var(--ink);
}

.header-profile-user {
    border: 2px solid var(--brand-soft);
}

/* ---------------------------------------------------------------------- */
/* Sidebar */
/* ---------------------------------------------------------------------- */

body[data-sidebar=dark] .vertical-menu {
    background: #262c40;
}

body[data-sidebar=dark] .navbar-brand-box {
    border-right: none;
}

body[data-sidebar=dark] .menu-title {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: #7178a3;
}

body[data-sidebar=dark] #sidebar-menu ul li a {
    border-radius: var(--radius-sm);
    margin: 0.1rem 0.75rem;
    padding: 0.65rem 1rem;
    transition: background-color .15s ease, color .15s ease;
}

body[data-sidebar=dark] #sidebar-menu ul li a:hover,
body[data-sidebar=dark] #sidebar-menu ul li a:focus {
    background-color: rgba(255, 255, 255, 0.06);
}

body[data-sidebar=dark] .mm-active > a {
    background-color: rgba(85, 110, 230, 0.18) !important;
}

/* ---------------------------------------------------------------------- */
/* Footer */
/* ---------------------------------------------------------------------- */

.footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--ink-muted);
    font-size: 0.875rem;
}

.footer a {
    color: var(--brand);
    font-weight: 500;
}

/* ---------------------------------------------------------------------- */
/* Auth / login screen */
/* ---------------------------------------------------------------------- */

.auth-page-wrapper {
    min-height: 100vh;
}

.auth-form-panel {
    background: var(--surface);
}

.auth-brand img {
    height: 46px;
}

.auth-heading {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-form-group-custom {
    position: relative;
}

/*.auth-form-group-custom .form-control {
    padding-left: 2.75rem;
    height: calc(2.9rem + 2px);
}*/

.auth-form-group-custom .auti-custom-input-icon {
    position: absolute;
    left: 0.95rem;
    top: 2.55rem;
    color: var(--ink-muted);
    font-size: 1.1rem;
}

.auth-form-group-custom .form-label {
    color: var(--ink);
}

.auth-side-panel {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
}

.auth-side-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(63, 82, 201, 0.88) 0%, rgba(85, 110, 230, 0.72) 55%, rgba(38, 44, 64, 0.85) 100%);
}

.auth-side-panel-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 26rem;
}

.auth-error-message {
    color: #f46a6a !important;
    background: rgba(244, 106, 106, 0.08);
    border: 1px solid rgba(244, 106, 106, 0.25);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    display: block;
    font-size: 0.9rem;
}

/* ---------------------------------------------------------------------- */
/* Dashboard welcome / quick links (Home) */
/* ---------------------------------------------------------------------- */

.welcome-banner {
    background: linear-gradient(120deg, var(--brand) 0%, var(--brand-dark) 100%);
    border-radius: var(--radius-lg);
    color: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.welcome-banner::after {
    content: "";
    position: absolute;
    right: -4rem;
    top: -4rem;
    width: 16rem;
    height: 16rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.quick-link-card {
    height: 100%;
    text-decoration: none;
    display: block;
}

.quick-link-card .icon-tile {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: var(--brand-soft);
    color: var(--brand);
}

/* ---------------------------------------------------------------------- */
/* Project cards */
/* ---------------------------------------------------------------------- */

.project-card .avatar-tile {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    margin: 0 auto;
}

.project-card .avatar-tile img {
    max-width: 2.1rem;
    max-height: 2.1rem;
}

.project-card .stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
}

.project-card .stat-value {
    font-weight: 600;
    word-break: break-all;
}

.project-card .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.project-card .action-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card .action-btn i {
    font-size: 0.95rem;
    line-height: 1;
    flex-shrink: 0;
}

.add-project-card {
    height: 100%;
    min-height: 100%;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--ink-muted);
    text-decoration: none;
    padding: 2rem 1rem;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.add-project-card:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-soft);
}

.add-project-card .icon-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 1.5rem;
    margin: 0 auto 0.75rem;
}

/* ---------------------------------------------------------------------- */
/* Responsive tweaks */
/* ---------------------------------------------------------------------- */

@media (max-width: 991.98px) {
    .card-body {
        padding: 1.15rem;
    }
}

@media (max-width: 575.98px) {
    .form-section {
        padding: 1.1rem;
    }

    .auth-side-panel {
        display: none;
    }

    .project-card .card-body {
        padding: 1rem;
    }

    .project-card .action-btn {
        font-size: 0.8rem;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }
}
