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

:root {
    --primary: #634524;
    --primary-light: #825d36;
    --primary-dark: #4b3217;
    --accent: #c5a059;
    --accent-light: #e4cf9b;
    --accent-dark: #a17f3e;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-alt: #f1f5f9;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --sidebar-width: 260px;
    --header-height: 70px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #301e0e 0%, #634524 50%, #301e0e 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
    transition: width var(--transition);
}

.sidebar-logo {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    height: var(--header-height);
    min-height: var(--header-height);
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
    box-sizing: border-box;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    transition: all var(--transition);
}

.sidebar-logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
}

.sidebar-logo-img {
    height: 32px;
    max-width: 105px;
    width: auto;
    object-fit: contain;
    transition: all var(--transition);
}

.sidebar-logo .logo-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity var(--transition);
}

.sidebar-logo .logo-text {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.3px;
    color: #fff;
    line-height: 1.2;
}

.sidebar-logo .logo-sub {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.75;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.2;
}

.btn-sidebar-pin {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    margin-left: auto;
    transition: all var(--transition);
    flex-shrink: 0;
}

.btn-sidebar-pin:hover {
    background: var(--accent);
    color: #301e0e;
    border-color: var(--accent);
}

.btn-sidebar-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition);
    flex-shrink: 0;
}

.btn-sidebar-toggle:hover {
    background: var(--surface-alt);
    color: var(--primary);
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.sidebar-nav .nav-section {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    padding: 12px 10px 4px;
    font-weight: 600;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    font-size: 13.5px;
    position: relative;
}

.sidebar-nav .nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding-left: 18px;
}

.sidebar-nav .nav-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 600;
}

.sidebar-nav .nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
}

.sidebar-nav .nav-item i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    color: var(--accent-light);
    flex-shrink: 0;
}

.sidebar-nav .nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: #301e0e;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Nav Groups (Collapsible Categories) */
.nav-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 2px;
}

.nav-group-header {
    width: 100%;
    background: transparent;
    border: none;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: all var(--transition);
    user-select: none;
    text-align: left;
}

.nav-group-header:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-group.open .nav-group-header {
    color: var(--accent-light);
}

.nav-group.has-active .nav-group-header {
    color: #ffffff;
}

.nav-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-group-icon {
    font-size: 13px;
    width: 18px;
    text-align: center;
    color: var(--accent);
    flex-shrink: 0;
}

.nav-group-chevron {
    font-size: 9px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.nav-group.open .nav-group-chevron {
    transform: rotate(180deg);
    color: var(--accent-light);
}

.nav-group-items {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 6px;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.nav-group.open .nav-group-items {
    max-height: 600px;
    opacity: 1;
}

/* Sub-module items (Turunan dari module group) */
.nav-group-items .nav-item {
    font-size: 12.5px;
    padding: 7px 12px 7px 14px;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 450;
    transition: all var(--transition);
}

.nav-group-items .nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
    padding-left: 17px;
}

.nav-group-items .nav-item.active {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-weight: 600;
}

.nav-group-items .nav-item i {
    color: #ffffff !important;
    font-size: 13.5px;
    width: 18px;
    opacity: 0.95;
    transition: opacity var(--transition), transform var(--transition);
}

.nav-group-items .nav-item:hover i {
    opacity: 1;
    transform: scale(1.08);
}

.nav-group-items .nav-item.active i {
    color: #ffffff !important;
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

/* ==========================================================================
   Desktop Minimized Sidebar State (.sidebar-minimized)
   ========================================================================== */
body.sidebar-minimized .sidebar,
.sidebar-minimized .sidebar {
    width: 72px !important;
}

body.sidebar-minimized .sidebar-logo,
.sidebar-minimized .sidebar-logo {
    padding: 12px 10px;
    justify-content: center;
}

body.sidebar-minimized .sidebar-brand,
.sidebar-minimized .sidebar-brand {
    justify-content: center;
    flex: none;
    width: 100%;
}

body.sidebar-minimized .sidebar-logo-box {
    width: 50px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 4px 6px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all var(--transition);
}

body.sidebar-minimized .sidebar-logo-box:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--accent);
    transform: scale(1.05);
}

body.sidebar-minimized .sidebar-logo-img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    display: block !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

body.sidebar-minimized .sidebar-logo .logo-info {
    display: none !important;
}

body.sidebar-minimized .sidebar-logo .btn-sidebar-pin {
    display: none !important;
}

body.sidebar-minimized .sidebar-footer {
    display: none;
}

body.sidebar-minimized .nav-section {
    display: none;
}

body.sidebar-minimized .nav-group-chevron {
    display: none;
}

body.sidebar-minimized .nav-text,
body.sidebar-minimized .nav-badge {
    display: none !important;
}

body.sidebar-minimized .nav-group-header {
    justify-content: center;
    padding: 12px 0;
}

body.sidebar-minimized .nav-group-title {
    justify-content: center;
}

body.sidebar-minimized .nav-group-items {
    padding-left: 0;
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
}

body.sidebar-minimized .nav-item {
    justify-content: center;
    padding: 12px 0;
    position: relative;
}

body.sidebar-minimized .nav-item:hover {
    padding-left: 0;
}

body.sidebar-minimized .nav-item.active::before {
    left: 0;
    width: 3px;
}

/* Tooltip on hover in minimized mode */
body.sidebar-minimized .nav-item[data-title]::after {
    content: attr(data-title);
    position: absolute;
    left: 78px;
    top: 50%;
    transform: translateY(-50%);
    background: #25170b;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(197, 160, 89, 0.3);
    z-index: 1000;
}

body.sidebar-minimized .nav-item[data-title]:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(4px);
}

body.sidebar-minimized .main-content,
.sidebar-minimized .main-content {
    margin-left: 72px !important;
    width: calc(100% - 72px) !important;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    background: rgba(0, 0, 0, 0.1);
}

/* Main Content Styles */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
    transition: width var(--transition), margin-left var(--transition);
}

/* Header Styles */
.header {
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header .page-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header .date-display {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--surface-alt);
    padding: 6px 14px;
    border-radius: 20px;
}

.header .user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.header .user-profile:hover {
    background: var(--surface-alt);
}

.header .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.header .user-info {
    display: flex;
    flex-direction: column;
}

.header .user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.header .user-role {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 500;
}

/* Content Area */
.content-area {
    padding: 30px 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Alert Notification */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.alert-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* Summary Cards Grid */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.summary-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
}

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

.summary-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.summary-card .card-icon.primary {
    background: #fdf5ec;
    color: var(--primary);
}

.summary-card .card-icon.accent {
    background: #fcf8ee;
    color: var(--accent);
}

.summary-card .card-icon.success {
    background: #ecfdf5;
    color: var(--success);
}

.summary-card .card-icon.danger {
    background: #fef2f2;
    color: var(--danger);
}

.summary-card .card-info {
    display: flex;
    flex-direction: column;
}

.summary-card .card-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 2px;
}

.summary-card .card-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

/* Panels / Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 14px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

table th {
    background: var(--surface-alt);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
}

table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
}

table tr {
    transition: background var(--transition);
}

table tr:hover td {
    background: var(--surface-alt);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-success {
    background: #ecfdf5;
    color: #059669;
}

.badge-warning {
    background: #fffbeb;
    color: #d97706;
}

.badge-danger {
    background: #fef2f2;
    color: #dc2626;
}

.badge-info {
    background: #eff6ff;
    color: #2563eb;
}

.badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.btn-accent {
    background: var(--accent);
    color: #301e0e;
}

.btn-accent:hover {
    background: var(--accent-dark);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--surface-alt);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.form-control {
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: all var(--transition);
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 69, 36, 0.08);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Ticketing Chat/Replies */
.ticket-chat {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    padding: 16px;
    background: var(--surface-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.chat-bubble {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 75%;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.5;
}

.chat-bubble.sender {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 2px;
}

.chat-bubble.receiver {
    align-self: flex-start;
    background: #fff;
    color: var(--text);
    border-bottom-left-radius: 2px;
    box-shadow: var(--shadow-sm);
}

.chat-meta {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    align-self: flex-end;
}

/* Two-tier approval components */
.approval-panel {
    background: var(--surface-alt);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.approval-stage {
    padding: 16px;
    background: #fff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.approval-stage-title {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   Responsive Dual-Pane Auth Layout (Desktop & Mobile)
   ========================================================================== */

.auth-page-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, rgba(228, 207, 155, 0.2) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(99, 69, 36, 0.1) 0%, transparent 40%),
                #f8fafc;
    padding: 30px 16px;
    box-sizing: border-box;
}

.auth-dual-card {
    display: grid;
    grid-template-columns: 1.05fr 1.2fr;
    width: 100%;
    max-width: 1020px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 50px -10px rgba(43, 24, 8, 0.18), 0 0 1px 1px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

/* Left Showcase Banner */
.auth-showcase-panel {
    background: linear-gradient(150deg, #2b1706 0%, #432810 45%, #634524 100%);
    color: #ffffff;
    padding: 44px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-showcase-panel::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-showcase-panel::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-brand-top {
    position: relative;
    z-index: 2;
}

.auth-brand-logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    margin-bottom: 14px;
}

.auth-brand-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 6px;
}

.auth-brand-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
    font-weight: 400;
}

/* Feature badges */
.auth-feature-items {
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 14px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.auth-feature-item:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(4px);
}

.auth-feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--accent);
    color: #301e0e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.auth-feature-text h4 {
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.auth-feature-text p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
    margin: 0;
}

/* Quick access / Simulation Section in Left Panel */
.auth-simulation-box {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(10px);
}

.auth-sim-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-light);
    margin-bottom: 12px;
}

.auth-sim-chips {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-sim-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: all 0.2s ease;
}

.auth-sim-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.auth-sim-btn.active {
    background: rgba(197, 160, 89, 0.3);
    border-color: var(--accent);
}

.auth-sim-btn-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-sim-avatar {
    font-size: 16px;
}

.auth-sim-info strong {
    display: block;
    font-size: 12px;
    color: #ffffff;
}

.auth-sim-info small {
    display: block;
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.65);
}

.auth-sim-btn i.fa-arrow-right {
    font-size: 11px;
    color: var(--accent-light);
    opacity: 0.7;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.auth-sim-btn:hover i.fa-arrow-right {
    opacity: 1;
    transform: translateX(3px);
}

.auth-sim-hint {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
    margin-top: 10px;
}

.auth-sim-hint code {
    background: rgba(255, 255, 255, 0.18);
    padding: 2px 6px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
}

/* Right Form Panel */
.auth-form-panel {
    background: #ffffff;
    padding: 44px 44px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-header {
    margin-bottom: 24px;
}

.auth-form-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-form-header p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Form Input Wrapper with Icon */
.auth-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-group i.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
}

.auth-input-group .form-control {
    padding-left: 42px !important;
    padding-right: 42px !important;
    height: 44px;
    width: 100%;
    font-size: 13.5px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    transition: all 0.2s ease;
}

.auth-input-group .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 69, 36, 0.1);
}

.btn-toggle-eye {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.btn-toggle-eye:hover {
    color: var(--text);
}

/* Checkbox and helper options */
.auth-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0;
}

.auth-remember-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.auth-remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Submit Button */
.btn-auth-submit {
    height: 46px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(99, 69, 36, 0.25);
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
}

.btn-auth-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 69, 36, 0.35);
}

.btn-auth-submit:active {
    transform: translateY(0);
}

/* Form Footer */
.auth-form-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-register-text {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.auth-register-text a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-register-text a:hover {
    text-decoration: underline;
}

.auth-career-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 30px;
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    align-self: center;
}

.auth-career-badge:hover {
    background: #ffffff;
    border-color: var(--accent);
    color: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Mobile-Only Elements */
.auth-mobile-sim-panel {
    display: none;
}

/* Backwards compatibility */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, rgba(228, 207, 155, 0.2) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(99, 69, 36, 0.1) 0%, transparent 40%),
                #f8fafc;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #4b3217 0%, #634524 100%);
    color: #fff;
    padding: 32px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.auth-header img {
    height: 48px;
}

.auth-body {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-footer {
    padding: 20px 24px;
    background: var(--surface-alt);
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ==========================================================================
   Responsive Breakpoints for Auth Screens
   ========================================================================== */

/* 1. Medium Tablets (<= 991px) */
@media (max-width: 991px) {
    .auth-dual-card {
        grid-template-columns: 1fr;
        max-width: 480px;
        border-radius: 20px;
    }
    
    .auth-showcase-panel {
        padding: 32px 24px 28px;
        text-align: center;
        align-items: center;
    }
    
    .auth-showcase-panel::before,
    .auth-showcase-panel::after {
        display: none;
    }
    
    .auth-brand-logo-img {
        height: 44px;
        margin: 0 auto 10px;
    }
    
    .auth-brand-title {
        font-size: 20px;
    }
    
    .auth-brand-desc {
        font-size: 12px;
        max-width: 360px;
        margin: 0 auto;
    }
    
    .auth-feature-items {
        display: none;
    }
    
    .auth-showcase-panel .auth-simulation-box {
        display: none;
    }
    
    .auth-form-panel {
        padding: 28px 24px;
    }
    
    .auth-form-header {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .auth-form-header h2 {
        font-size: 20px;
    }
    
    .auth-mobile-sim-panel {
        display: block;
        padding: 0 24px 24px;
        background: #ffffff;
    }
    
    .auth-mobile-sim-panel .auth-simulation-box {
        background: var(--surface-alt);
        border: 1px solid var(--border);
        color: var(--text);
        box-shadow: none;
    }
    
    .auth-mobile-sim-panel .auth-sim-heading {
        color: var(--primary-dark);
        font-weight: 700;
    }
    
    .auth-mobile-sim-panel .auth-sim-btn {
        background: #ffffff;
        border: 1px solid var(--border);
        color: var(--text);
    }
    
    .auth-mobile-sim-panel .auth-sim-info strong {
        color: var(--text);
    }
    
    .auth-mobile-sim-panel .auth-sim-info small {
        color: var(--text-secondary);
    }
    
    .auth-mobile-sim-panel .auth-sim-btn i.fa-arrow-right {
        color: var(--primary);
    }
    
    .auth-mobile-sim-panel .auth-sim-btn:hover {
        background: var(--surface-alt);
        border-color: var(--primary);
    }
    
    .auth-mobile-sim-panel .auth-sim-hint {
        color: var(--text-muted);
    }
    
    .auth-mobile-sim-panel .auth-sim-hint code {
        background: var(--border);
        color: var(--text);
    }
}

/* 2. Small Phones (<= 480px) */
@media (max-width: 480px) {
    .auth-page-wrapper {
        padding: 12px 10px;
    }
    
    .auth-dual-card {
        border-radius: 16px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    }
    
    .auth-showcase-panel {
        padding: 24px 18px 20px;
    }
    
    .auth-form-panel {
        padding: 22px 18px;
    }
    
    .auth-mobile-sim-panel {
        padding: 0 18px 20px;
    }
    
    .auth-input-group .form-control {
        height: 42px;
        font-size: 13px;
    }
    
    .btn-auth-submit {
        height: 44px;
        font-size: 13.5px;
    }
}

/* ==========================================================================
   Responsive Architecture & Fluid Layout System (Desktop & Mobile)
   ========================================================================== */

/* Mobile Sidebar Backdrop Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 95;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Page Containers */
.page-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Responsive Action Header */
.page-header-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
}

.page-header-action .action-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-header-action .action-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Form Cards & Wide Panels (Expansive Desktop Real-estate) */
.form-card,
.form-card-wide {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    width: 100%;
    box-sizing: border-box;
}

.form-section {
    margin-bottom: 28px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Multi-Column Responsive Form Grids */
.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

/* Split Column Two-Side Layout (Earnings vs Deductions, Details vs Sidebars) */
.split-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

/* Form Action Buttons Bar */
.form-actions-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    margin-top: 10px;
}

/* Smooth Table Responsive Scroller */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   Breakpoints & Media Queries
   ========================================================================== */

/* 1. Large Laptops & Standard Desktops (<= 1200px) */
@media (max-width: 1200px) {
    .form-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 2. Tablets & Small Desktops (<= 992px) */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 100;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100% !important;
        min-width: 0;
    }
    
    .content-area {
        padding: 22px 20px;
        gap: 20px;
    }
    
    .form-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .split-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .approval-panel {
        grid-template-columns: 1fr !important;
    }
}

/* 3. Mobile Devices & Small Tablets (<= 768px) */
@media (max-width: 768px) {
    .header {
        padding: 0 16px;
        height: 60px;
    }
    
    .header .date-display {
        display: none;
    }
    
    .header .user-role {
        display: none;
    }
    
    .header .user-name {
        font-size: 12px;
        max-width: 120px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .content-area {
        padding: 16px 14px;
        gap: 16px;
    }
    
    .card {
        padding: 16px;
        gap: 16px;
        border-radius: var(--radius-sm);
    }
    
    .form-card,
    .form-card-wide {
        padding: 18px 14px;
        border-radius: var(--radius-sm);
    }
    
    .form-grid,
    .form-grid-2,
    .form-grid-3,
    .form-grid-4,
    .form-grid-auto {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }
    
    .page-header-action {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .page-header-action .action-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    
    .page-header-action .action-right .btn {
        width: 100%;
        justify-content: center;
    }
    
    .form-actions-bar {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 10px;
    }
    
    .form-actions-bar .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .stat-card {
        padding: 14px;
        gap: 12px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .stat-value {
        font-size: 17px;
    }
    
    .filter-grid {
        grid-template-columns: 1fr !important;
    }
    
    .batch-cards-grid {
        grid-template-columns: 1fr !important;
    }
    
    .generate-card {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }
    
    .generate-form {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .generate-form select,
    .generate-form button {
        width: 100%;
    }
}

/* 4. Small Smartphones (<= 480px) */
@media (max-width: 480px) {
    .content-area {
        padding: 12px 10px;
        gap: 14px;
    }
    
    .header .page-title {
        font-size: 15px;
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-header .btn {
        width: 100%;
        justify-content: center;
    }
}

