/* --------------------------------------------------------------------------
   E-Clinic Pasundan Ganeas - Custom Brand Theme & Responsive System
   Primary Palette: Emerald Green (#046A38), Lime Green (#84CC16), Red (#E60000)
   -------------------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand Colors derived from Logo2.png */
    --brand-emerald: #046a38;
    --brand-emerald-dark: #024a26;
    --brand-emerald-light: #0d8a4c;
    --brand-lime: #84cc16;
    --brand-lime-light: #a3e635;
    --brand-lime-soft: #ecfccb;
    --brand-red: #dc2626;
    --brand-red-light: #ef4444;
    --brand-red-soft: #fee2e2;

    /* Neutrals & Surfaces */
    --bg-app: #f4f7f5;
    --bg-card: #ffffff;
    --bg-subtle: #f8faf9;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Shadows & Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 3px rgba(4, 106, 56, 0.05);
    --shadow-md: 0 4px 12px rgba(4, 106, 56, 0.08);
    --shadow-lg: 0 10px 25px rgba(4, 106, 56, 0.12);
    --shadow-brand: 0 8px 20px rgba(4, 106, 56, 0.25);
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Brand Navbar Header */
.navbar-pasundan {
    background: linear-gradient(135deg, var(--brand-emerald-dark) 0%, var(--brand-emerald) 100%);
    box-shadow: var(--shadow-md);
    border-bottom: 3px solid var(--brand-lime);
    padding: 0.75rem 1.5rem;
}

.brand-logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.brand-title {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.brand-badge {
    background-color: var(--brand-lime);
    color: var(--brand-emerald-dark);
    font-weight: 800;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Navigation Links */
.nav-link-pasundan {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link-pasundan:hover,
.nav-link-pasundan.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Buttons System */
.btn-emerald {
    background-color: var(--brand-emerald);
    color: #ffffff;
    font-weight: 600;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.btn-emerald:hover,
.btn-emerald:focus {
    background-color: var(--brand-emerald-dark);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-brand);
}

.btn-lime {
    background-color: var(--brand-lime);
    color: var(--brand-emerald-dark);
    font-weight: 700;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.btn-lime:hover {
    background-color: var(--brand-lime-light);
    color: var(--brand-emerald-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(132, 204, 22, 0.4);
}

.btn-outline-emerald {
    border: 2px solid var(--brand-emerald);
    color: var(--brand-emerald);
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.5rem 1.15rem;
    background: transparent;
    transition: all 0.2s ease;
}

.btn-outline-emerald:hover {
    background-color: var(--brand-emerald);
    color: #ffffff;
}

/* Premium Card Styles */
.card-pasundan {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.card-pasundan:hover {
    box-shadow: var(--shadow-md);
}

.card-pasundan-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-pasundan-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand-emerald-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stat Widgets */
.stat-widget {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border-left: 5px solid var(--brand-emerald);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.stat-widget:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-widget.lime-border {
    border-left-color: var(--brand-lime);
}

.stat-widget.red-border {
    border-left-color: var(--brand-red);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.emerald {
    background-color: rgba(4, 106, 56, 0.1);
    color: var(--brand-emerald);
}

.stat-icon.lime {
    background-color: var(--brand-lime-soft);
    color: #4d7c0f;
}

.stat-icon.red {
    background-color: var(--brand-red-soft);
    color: var(--brand-red);
}

/* Form Controls */
.form-control-pasundan,
.form-select-pasundan {
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control-pasundan:focus,
.form-select-pasundan:focus {
    border-color: var(--brand-emerald);
    box-shadow: 0 0 0 4px rgba(4, 106, 56, 0.15);
    outline: none;
}

/* Responsive Utilities */
@media (max-width: 991.98px) {
    .navbar-pasundan {
        padding: 0.5rem 1rem;
    }
    .brand-title {
        font-size: 1.1rem;
    }
    .workspace-panel {
        margin-bottom: 1rem;
    }
}

@media (max-width: 575.98px) {
    .brand-logo-img {
        height: 34px;
    }
    .stat-widget {
        padding: 1rem;
    }
}

/* --------------------------------------------------------------------------
   Sidebar & Header Grid Layout
   -------------------------------------------------------------------------- */
.wrapper-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.sidebar-pasundan {
    width: 260px;
    background-color: var(--brand-emerald-dark);
    border-right: 3px solid var(--brand-lime);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1030;
    flex-shrink: 0;
}

.sidebar-brand-wrapper {
    background-color: #ffffff;
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    height: 70px;
}

.sidebar-brand-wrapper .brand-logo-img {
    height: 40px;
    filter: none;
}

.sidebar-brand-wrapper .brand-title {
    color: var(--brand-emerald-dark);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0.5rem;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-menu-item {
    margin-bottom: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.12);
}

.sidebar-text {
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

/* Collapsed Sidebar State */
.sidebar-collapsed .sidebar-pasundan {
    width: 75px;
}

.sidebar-collapsed .sidebar-pasundan .brand-title-container,
.sidebar-collapsed .sidebar-pasundan .sidebar-text,
.sidebar-collapsed .sidebar-pasundan .dropdown-toggle::after {
    display: none !important;
}

.sidebar-collapsed .sidebar-pasundan .sidebar-brand-wrapper {
    justify-content: center;
    padding: 0.5rem;
    overflow: hidden;
}

.sidebar-collapsed .sidebar-pasundan .sidebar-brand-wrapper a {
    justify-content: center;
    width: 100%;
}

.sidebar-collapsed .sidebar-pasundan .sidebar-link {
    justify-content: center;
    padding: 0.75rem;
}

/* Top Header styling */
.main-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--bg-app);
}

.top-header-pasundan {
    height: 70px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.toggle-sidebar-btn {
    background: transparent;
    border: none;
    color: var(--brand-emerald-dark);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
}

.toggle-sidebar-btn:hover {
    background-color: #f1f5f9;
}

.profile-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    transition: background-color 0.2s;
}

.profile-dropdown-btn:hover {
    background-color: #f1f5f9;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--brand-lime-soft);
    color: var(--brand-emerald-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Responsive sidebar */
@media (max-width: 991.98px) {
    .sidebar-pasundan {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        height: 100vh;
        width: 260px !important;
    }
    
    .sidebar-open .sidebar-pasundan {
        left: 0 !important;
    }
    
    .sidebar-collapsed .sidebar-pasundan {
        left: -260px !important;
    }
}

