/* 
---------------------------------------------------------
PHARMA CHAIN - GLOBAL DESIGN SYSTEM & BRAND GUIDELINES
---------------------------------------------------------
Design Tokens:
- Primary: #2563eb (Vibrant Blue)
- Secondary: #0f172a (Deep Slate / Navy)
- Surface: #ffffff
- Background: #f8fafc
- Text: #1e293b
- Radius: 12px
- Shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)
*/

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

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #1C958F;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #cbd5e1;
    --radius: 12px;
    --sidebar-width: 280px;
}

/* INDIVIDUAL PANEL SIDEBAR COLORS */
.admin-sidebar { --secondary: #0f172a; }        /* Deep Navy */
.pharmacist-sidebar { --secondary: #064e3b; }   /* Emerald Dark */
.manufacturer-sidebar { --secondary: #0f172a; } /* Deep Rust */
.supplier-sidebar { --secondary: #1e1b4b; }     /* Indigo Dark */
.distributor-sidebar { --secondary: #312e81; }  /* Royal Blue Dark */


body {
    font-family: 'Inter', sans-serif; 
    background-color: var(--background);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
}

footer {
    background-color: var(--secondary) !important;
    color: #ffffff !important;
}

.bg-secondary {
    background-color: var(--secondary) !important;
}

.btn-secondary {
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
    color: white !important;
}

.btn-secondary:hover {
    filter: brightness(90%);
}

h1,
h2,
h3,
h4,
.brand-font {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* AUTHENTICATION ARCHITECTURE */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #f8fafc, #e2e8f0);
    padding: 2rem;
}

.auth-card {
    background: var(--surface);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 480px;
    border: 1px solid var(--border);
}

.auth-logo {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 2rem;
    text-align: center;
}

/* FORM ELEMENTS */
.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 1.5px solid #a3b8cc !important;
    /* Forced visibility for all panels */
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    background-color: #ffffff !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
    background-color: #ffffff !important;
}

/* BUTTONS */
.btn-primary {
    background-color: var(--primary);
    border: none;
    padding: 0.875rem 1.5rem;
    font-weight: 700;
    border-radius: var(--radius);
    color: white;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

/* DASHBOARD LAYOUT */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--secondary);
    color: white;
    padding: 2rem 1rem;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar nav {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    color: rgba(255, 255, 255, 0.65) !important;
    text-decoration: none !important;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
}

.sidebar-link i {
    width: 24px;
    text-align: center;
    margin-right: 12px;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff !important;
}

.sidebar-link:hover i {
    color: var(--primary);
}

.sidebar-link.active {
    background-color: var(--primary);
    color: #fff !important;
    box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.4);
}

.sidebar-link.active i {
    color: #fff;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2.5rem;
    padding-top: 100px;
}

/* TOP NAVBAR */
.dashboard-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    height: 80px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 2.5rem;
    z-index: 999;
}

/* TOP NAVBAR USER PILL */
.user-pill {
    background: #fff;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.user-pill:hover {
    background: #f8fafc;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* CARDS */
.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
}

/* TABLES */
.custom-table {
    width: 100%;
    border-spacing: 0;
}

.custom-table th {
    background: #f1f5f9;
    color: var(--text-muted);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.custom-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

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

/* REUSABLE CLASSES */
.shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.rounded-lg {
    border-radius: 16px;
}

.bg-white {
    background: #fff;
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: 0.3s;
    }

    .main-content,
    .dashboard-nav {
        margin-left: 0;
        left: 0;
    }
}

/* CAROUSEL ANIMATIONS */
.carousel-item {
    transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
}

.carousel-fade .carousel-item {
    opacity: 0;
    transition-duration: 0.8s;
    transition-property: opacity;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

.animate {
    animation-duration: 1s;
    animation-fill-mode: both;
}

@keyframes slideIn {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slideIn {
    animation-name: slideIn;
}