/* Perkantas Bank Data - Custom Professional Visual System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --pk-primary: #0F2C59;
    --pk-primary-hover: #1E3A8A;
    --pk-primary-light: #EBF3FF;
    --pk-accent: #E07A5F;
    --pk-accent-hover: #D0694E;
    --pk-gold: #D97706;
    --pk-bg: #F8FAFC;
    --pk-card-bg: #FFFFFF;
    --pk-text-main: #1E293B;
    --pk-text-muted: #64748B;
    --pk-border: #CBD5E1;
    --pk-sidebar-width: 250px;
    --pk-shadow-sm: 0 1px 3px rgba(15, 44, 89, 0.05), 0 1px 2px rgba(15, 44, 89, 0.03);
    --pk-shadow-md: 0 4px 12px rgba(15, 44, 89, 0.08), 0 2px 4px rgba(15, 44, 89, 0.04);
    --pk-radius: 0.625rem;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.85rem;
    line-height: 1.45;
    background-color: var(--pk-bg);
    color: var(--pk-text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

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

/* Global Compact Typography Overrides */
h1, .h1 { font-size: 1.35rem; font-weight: 800; }
h2, .h2 { font-size: 1.2rem; font-weight: 700; }
h3, .h3 { font-size: 1.1rem; font-weight: 700; }
h4, .h4 { font-size: 1.0rem; font-weight: 700; }
h5, .h5 { font-size: 0.925rem; font-weight: 700; }
h6, .h6 { font-size: 0.85rem; font-weight: 700; }

.fw-bold-700 { font-weight: 700; }
.fw-bold-800 { font-weight: 800; }

/* Font size utility fine-tuning for compact layout */
.fs-1 { font-size: 1.65rem !important; }
.fs-2 { font-size: 1.45rem !important; }
.fs-3 { font-size: 1.25rem !important; }
.fs-4 { font-size: 1.1rem !important; }
.fs-5 { font-size: 0.975rem !important; }
.fs-6 { font-size: 0.9rem !important; }
.fs-7 { font-size: 0.825rem !important; }
.fs-8 { font-size: 0.775rem !important; }
.fs-9 { font-size: 0.725rem !important; }

/* Main Layout Wrapper */
.app-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styling (Desktop) */
.app-sidebar {
    width: var(--pk-sidebar-width);
    background: #091E3E;
    color: #E2E8F0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1030;
    transition: all 0.3s ease;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
    padding: 1.25rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--pk-accent) 0%, #F4A261 100%);
    color: #FFFFFF;
    border-radius: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(224, 122, 95, 0.3);
}

.sidebar-brand-title {
    font-size: 0.975rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.2px;
}

.sidebar-brand-subtitle {
    font-size: 0.7rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    padding: 0.75rem 0;
    flex-grow: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
    scroll-behavior: smooth;
}

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: var(--pk-accent);
}

/* Global Custom Slim Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.menu-header {
    padding: 0.7rem 1.15rem 0.35rem 1.15rem;
    font-size: 0.675rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748B;
    letter-spacing: 0.8px;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.15rem;
    color: #94A3B8;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link-custom i {
    font-size: 1.0rem;
    width: 18px;
    text-align: center;
}

.nav-link-custom:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
}

.nav-link-custom.active {
    color: #FFFFFF;
    background: rgba(224, 122, 95, 0.12);
    border-left-color: var(--pk-accent);
    font-weight: 600;
}

.nav-link-custom.active i {
    color: var(--pk-accent);
}

.sidebar-user {
    padding: 0.85rem 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(0, 0, 0, 0.15);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pk-primary-hover);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.825rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #FFFFFF;
}

.user-role {
    font-size: 0.7rem;
    color: #94A3B8;
}

/* Main Content */
.app-main {
    flex-grow: 1;
    margin-left: var(--pk-sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - var(--pk-sidebar-width));
    max-width: calc(100% - var(--pk-sidebar-width));
    overflow-x: hidden;
}

@media (max-width: 991.98px) {
    .app-sidebar { display: none; }
    .app-main { margin-left: 0 !important; width: 100% !important; max-width: 100% !important; }
}

.app-navbar {
    height: 56px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--pk-border);
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: var(--pk-shadow-sm);
    overflow: visible;
}

/* Cards & Components */
.card-custom {
    background: var(--pk-card-bg);
    border: 1px solid var(--pk-border);
    border-radius: var(--pk-radius);
    box-shadow: var(--pk-shadow-sm);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.card-custom-header {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--pk-border);
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.card-custom-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pk-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.card-custom-body { padding: 1.15rem; }

/* Metric Cards */
.metric-card {
    background: #FFFFFF;
    border: 1px solid var(--pk-border);
    border-radius: var(--pk-radius);
    padding: 1.0rem;
    box-shadow: var(--pk-shadow-sm);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--pk-shadow-md);
}

.metric-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.metric-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pk-primary);
    line-height: 1.1;
    margin-top: 0.3rem;
    margin-bottom: 0.1rem;
}

.metric-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--pk-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.2;
}

/* Form Controls & Inputs */
.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.3rem;
}

.form-control, .form-select {
    border-radius: 0.45rem;
    border: 1px solid #CBD5E1;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    color: #0F172A;
    background-color: #F8FAFC;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    background-color: #FFFFFF;
    border-color: var(--pk-primary);
    box-shadow: 0 0 0 3px rgba(15, 44, 89, 0.12);
}

.form-control-sm, .form-select-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.775rem;
    border-radius: 0.35rem;
}

/* Table Compact Styling */
.table {
    font-size: 0.825rem;
}

.table th {
    font-weight: 700;
    color: var(--pk-primary);
    font-size: 0.8rem;
}

.table th, .table td {
    padding: 0.55rem 0.75rem;
    vertical-align: middle;
}

/* Badges */
.badge-custom {
    padding: 0.3em 0.65em;
    font-size: 0.725rem;
    font-weight: 600;
    border-radius: 50rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Buttons */
.btn {
    font-size: 0.825rem;
    padding: 0.4rem 0.9rem;
    border-radius: 0.45rem;
}

.btn-sm {
    font-size: 0.775rem;
    padding: 0.3rem 0.7rem;
    border-radius: 0.35rem;
}

.btn-lg {
    font-size: 0.9rem;
    padding: 0.5rem 1.1rem;
    border-radius: 0.5rem;
}

.btn-primary-pk {
    background-color: var(--pk-primary);
    border-color: var(--pk-primary);
    color: #FFFFFF;
    font-weight: 600;
}

.btn-primary-pk:hover {
    background-color: var(--pk-primary-hover);
    color: #FFFFFF;
}

.btn-accent-pk {
    background-color: var(--pk-accent);
    border-color: var(--pk-accent);
    color: #FFFFFF;
    font-weight: 600;
}

.btn-accent-pk:hover {
    background-color: var(--pk-accent-hover);
    color: #FFFFFF;
}

.btn-outline-pk {
    border: 1px solid var(--pk-border);
    color: var(--pk-text-main);
    font-weight: 600;
}

.btn-outline-pk:hover {
    background-color: #F1F5F9;
    color: var(--pk-primary);
}

.btn-sm.btn-primary-pk,
.btn-sm.btn-accent-pk,
.btn-sm.btn-outline-pk {
    padding: 0.3rem 0.7rem;
    font-size: 0.775rem;
    border-radius: 0.35rem;
}

.page-header-container { margin-bottom: 1.15rem; }
.page-title { font-size: 1.25rem; font-weight: 800; color: var(--pk-primary); margin-bottom: 0.15rem; }
.page-subtitle { font-size: 0.8rem; color: var(--pk-text-muted); }

/* Footer */
.app-footer {
    padding: 1.0rem 1.25rem;
    background: #FFFFFF;
    border-top: 1px solid var(--pk-border);
    margin-top: auto;
    font-size: 0.775rem;
    color: var(--pk-text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Education Repeater Row Styling */
.education-repeater-card {
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 0.5rem;
    padding: 1.0rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}

.education-repeater-card:hover {
    border-color: #CBD5E1;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

/* Media Queries for Maximum Mobile & Tablet Responsiveness */
@media (max-width: 991.98px) {
    .app-wrapper > .app-sidebar { display: none; }
    .offcanvas .app-sidebar { display: flex !important; width: 100% !important; min-height: 100% !important; position: static !important; box-shadow: none !important; }
    .app-main { margin-left: 0 !important; width: 100% !important; }
    .page-header-container { flex-direction: column; align-items: flex-start !important; }
    .page-header-container > div { width: 100%; }
    .nav-tabs-custom { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
    .table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .select2-container { width: 100% !important; }
}

@media (max-width: 575.98px) {
    .page-title { font-size: 1.15rem; }
    .card-custom-body { padding: 0.85rem !important; }
    .btn { font-size: 0.775rem; padding: 0.35rem 0.7rem; }
    .modal-dialog { margin: 0.5rem; }
}
