/**
 * GD-PULE Warehouse Management System - Modern Design System
 */

@import url('../vendor/fonts/plus-jakarta-sans.css');

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #eff6ff;
    --secondary-color: #64748b;
    --sidebar-bg: #0f172a;
    --sidebar-card: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-active: #3b82f6;
    --body-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    --shadow-elevated: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    font-size: 0.925rem;
    overflow-x: hidden;
}

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

/* Sidebar Styles */
.app-sidebar {
    width: 270px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1030;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.sidebar-brand-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.sidebar-brand-subtitle {
    font-size: 0.72rem;
    color: var(--sidebar-text);
    font-weight: 500;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

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

.menu-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 14px 12px 6px;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.nav-link-custom i.fa-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.nav-link-custom:hover {
    color: var(--sidebar-text-active);
    background-color: var(--sidebar-hover);
    transform: translateX(3px);
}

.nav-link-custom.active {
    color: #ffffff;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-link-custom.active i.fa-icon {
    color: #ffffff;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(0, 0, 0, 0.15);
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--sidebar-card);
    padding: 10px 12px;
    border-radius: var(--radius-md);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Main Content Area */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Navbar */
.app-topbar {
    background: #ffffff;
    height: 68px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.branch-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--primary-light);
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.84rem;
}

.branch-badge.central {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

/* Page Container */
.page-container {
    padding: 28px;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin: 0;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 4px;
}

/* Metric Cards */
.metric-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-card);
    transition: all 0.25s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-elevated);
    border-color: #cbd5e1;
}

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

.metric-value {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    line-height: 1.1;
    margin: 10px 0 4px;
}

.metric-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Custom Standard Table */
.custom-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.card-header-clean {
    padding: 18px 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header-clean h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
}

.table-modern {
    margin-bottom: 0;
}

.table-modern th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 20px;
    border-top: none;
    border-bottom: 1px solid var(--border-color);
}

.table-modern td {
    padding: 16px 20px;
    vertical-align: middle;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.table-modern tr:hover td {
    background-color: #f8fafc;
}

/* Status Badges */
.badge-soft-success {
    background-color: #d1fae5;
    color: #065f46;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
}

.badge-soft-danger {
    background-color: #fee2e2;
    color: #991b1b;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
}

.badge-soft-warning {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
}

.badge-soft-info {
    background-color: #e0f2fe;
    color: #075985;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
}

.badge-soft-primary {
    background-color: #dbeafe;
    color: #1e40af;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
}

/* Custom Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
    transition: all 0.2s ease;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(59, 130, 246, 0.35);
}

/* Auth Login Page */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    background: #0f172a;
}

.auth-sidebar-hero {
    flex: 1.2;
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 50%, #0c4a6e 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.auth-sidebar-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 720px;
    gap: 22px;
    position: relative;
    z-index: 1;
}

.auth-warehouse-img {
    max-width: 620px;
    max-height: 48vh;
    width: 90%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
    transition: transform 0.4s ease, filter 0.4s ease;
    position: relative;
    z-index: 1;
}

.auth-warehouse-img:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.55));
}

/* Notice Catatan Pengiriman: Border Merah BOLD & Efek Impulse CSS */
.auth-notice-impulse {
    width: 94%;
    max-width: 650px;
    background: rgba(15, 23, 42, 0.85);
    border: 2.5px solid #ef4444;
    border-radius: 12px;
    padding: 16px 20px;
    color: #ffffff;
    text-align: left;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.45), inset 0 0 12px rgba(239, 68, 68, 0.12);
    animation: impulseNotice 2.2s infinite ease-in-out;
    position: relative;
    z-index: 2;
}

.auth-notice-impulse:hover {
    animation-play-state: paused;
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.85), inset 0 0 18px rgba(239, 68, 68, 0.2);
    border-color: #f87171;
}

.auth-notice-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #fca5a5;
    margin-bottom: 8px;
}

.auth-notice-header i {
    color: #ef4444;
    font-size: 1.1rem;
    animation: pulseIcon 1.5s infinite;
}

.auth-notice-text {
    font-size: 0.88rem;
    line-height: 1.55;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0;
}

.auth-notice-text .highlight-warning {
    color: #fef08a;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-notice-text .highlight-danger {
    color: #fca5a5;
    font-weight: 800;
}

@keyframes impulseNotice {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.75), 0 0 15px rgba(239, 68, 68, 0.4);
        border-color: #ef4444;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0), 0 0 30px rgba(239, 68, 68, 0.8);
        border-color: #f87171;
        transform: scale(1.012);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0), 0 0 15px rgba(239, 68, 68, 0.4);
        border-color: #ef4444;
        transform: scale(1);
    }
}

@keyframes pulseIcon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.25);
        color: #f87171;
    }
}

.auth-form-container {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    max-width: 540px;
}

.auth-card {
    width: 100%;
}

.demo-account-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 14px;
    margin-top: 24px;
}

.demo-btn {
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 600;
}

.demo-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

@media (max-width: 992px) {
    .auth-sidebar-hero {
        display: none;
    }
    .auth-form-container {
        max-width: 100%;
        padding: 30px;
    }
    .app-sidebar {
        position: fixed;
        left: -270px;
    }
    .app-sidebar.show {
        left: 0;
    }
}
