/*
 * ONEXPRESS Premium Design System - Custom Stylesheet
 * Integrates directly with SB Admin 2 to elevate the aesthetics to a luxury, modern web experience.
 */

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

:root {
    --primary: #1e3a8a;
    --primary-light: #2e5cb8;
    --primary-dark: #0f172a;
    --accent-orange: #f59e0b;
    --accent-green: #10b981;
    --accent-blue: #0ea5e9;
    --bg-slate: #f8fafc;
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    --card-shadow-hover: 0 20px 40px -5px rgba(0, 0, 0, 0.08), 0 10px 20px -6px rgba(0, 0, 0, 0.04);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Font Override */
body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, p, span, a, input, button, select, table {
    font-family: 'Outfit', sans-serif !important;
}

body {
    background-color: var(--bg-slate);
}

/* Premium Sidebar Styles */
#accordionSidebar {
    background: linear-gradient(180deg, #0b1329 0%, #111c44 100%) !important;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
    border-right: none !important;
}

#accordionSidebar .sidebar-brand {
    height: auto;
    padding: 1.5rem 1rem;
    margin-bottom: 0.5rem;
}

#accordionSidebar .nav-item .nav-link {
    font-weight: 500;
    padding: 0.85rem 1.2rem;
    margin: 0.2rem 0.8rem;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-smooth);
}

#accordionSidebar .nav-item .nav-link i {
    font-size: 1.05rem;
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
    transition: var(--transition-smooth);
}

#accordionSidebar .nav-item .nav-link:hover,
#accordionSidebar .nav-item.active .nav-link {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

#accordionSidebar .nav-item .nav-link:hover i,
#accordionSidebar .nav-item.active .nav-link i {
    color: var(--accent-orange) !important;
    transform: scale(1.1);
}

.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    margin: 0.75rem 1.5rem !important;
}

.sidebar-heading {
    color: rgba(255, 255, 255, 0.4) !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.65rem !important;
    letter-spacing: 1px;
    padding: 0.5rem 1.5rem !important;
}

/* Premium Topbar Styles */
.topbar {
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02) !important;
    height: 4.5rem;
}

.topbar .nav-item .nav-link .img-profile {
    border: 2px solid rgba(30, 58, 138, 0.1);
    padding: 2px;
    transition: var(--transition-smooth);
}

.topbar .nav-item .nav-link:hover .img-profile {
    border-color: var(--accent-orange);
    transform: scale(1.05);
}

/* Premium Card Styles */
.card {
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 16px !important;
    box-shadow: var(--card-shadow) !important;
    background-color: #ffffff;
    transition: var(--transition-smooth) !important;
    overflow: hidden;
}

.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
    padding: 1.25rem 1.5rem !important;
}

.card-header h6 {
    font-weight: 700 !important;
    color: var(--primary) !important;
    letter-spacing: 0.5px;
}

/* Premium Buttons */
.btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 0.6rem 1.2rem;
    transition: var(--transition-smooth) !important;
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15) !important;
}

.btn-primary:hover {
    background-color: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.25) !important;
}

/* Dashboard Specific Cards (hover-lift effect) */
.hover-lift {
    transition: var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover) !important;
}

.border-left-primary { border-left: 5px solid var(--primary) !important; }
.border-left-danger { border-left: 5px solid var(--accent-orange) !important; }
.border-left-success { border-left: 5px solid var(--accent-green) !important; }
.border-left-info { border-left: 5px solid var(--accent-blue) !important; }

/* Login Page Premium Glassmorphism */
.bg-login-gradient {
    background: linear-gradient(135deg, #0b1329 0%, #1e3a8a 100%) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.card-login-premium {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

.form-control-premium {
    border-radius: 10px !important;
    border: 1.5px solid #cbd5e1 !important;
    padding: 1.4rem 1rem !important;
    font-size: 0.95rem !important;
    transition: var(--transition-smooth) !important;
}

.form-control-premium:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1) !important;
}

/* Address Card Copy Actions */
.address-field-card {
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.address-field-card:hover {
    border-color: var(--primary-light);
    background-color: #ffffff;
}

.address-value {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.copy-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    padding: 0.4rem;
    border-radius: 6px;
}

.copy-btn:hover {
    color: var(--accent-orange);
    background-color: rgba(245, 158, 11, 0.08);
}

/* Tracking Package Timeline (Stepper) */
.package-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 1rem 0;
    margin: 1.5rem 0;
}

.package-stepper::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 4px;
    background-color: #e2e8f0;
    transform: translateY(-50%);
    z-index: 1;
}

.package-stepper-progress {
    position: absolute;
    top: 50%;
    left: 10%;
    height: 4px;
    background-color: var(--accent-green);
    transform: translateY(-50%);
    z-index: 1;
    transition: width 0.6s ease;
}

.step-node {
    position: relative;
    z-index: 2;
    background-color: #ffffff;
    border: 3px solid #cbd5e1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    transition: var(--transition-smooth);
}

.step-node.active {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.step-node.completed {
    border-color: var(--accent-green);
    background-color: var(--accent-green);
    color: #ffffff;
}

.step-label {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.step-node.active + .step-label,
.step-node.completed + .step-label {
    color: var(--primary-dark);
}

/* Toast Notifications */
.premium-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    color: #ffffff;
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.premium-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Profile Form styling */
.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.profile-info-item {
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 1.1rem 1.4rem;
    border: 1px solid #e2e8f0;
}

.profile-info-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
}

.profile-info-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0;
}
