/* Pharma Blue Modern Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --pharma-primary: #0f4c81; /* Royal Pharma Blue */
    --pharma-primary-light: #e6f0fa;
    --pharma-secondary: #00a8cc; /* Teal accent */
    --pharma-dark: #0f172a; /* Slate 900 */
    --pharma-sidebar: #132238; /* Navy deep blue */
    --pharma-sidebar-hover: #1e3556;
    --pharma-bg: #f8fafc; /* Cool grey/white */
    --pharma-card-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.05);
    --pharma-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-inter: 'Inter', sans-serif;
}

body {
    font-family: var(--font-inter);
    background-color: var(--pharma-bg);
    color: #334155; /* Slate 700 */
    overflow-x: hidden;
}

/* Sidebar Styling */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar-wrapper {
    min-width: 260px;
    max-width: 260px;
    background: var(--pharma-sidebar);
    color: #ffffff;
    transition: var(--pharma-transition);
    min-height: 100vh;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

#sidebar-wrapper.collapsed {
    margin-left: -260px;
}

.sidebar-heading {
    padding: 1.5rem 1.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, var(--pharma-primary) 0%, #005691 100%);
}

.sidebar-heading span {
    color: var(--pharma-secondary);
}

.list-group-item-action {
    background-color: transparent !important;
    color: #cbd5e1 !important; /* Slate 300 */
    border: none;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--pharma-transition);
    display: flex;
    align-items: center;
    border-left: 4px solid transparent;
}

.list-group-item-action i {
    width: 25px;
    font-size: 1.1rem;
    margin-right: 10px;
    transition: var(--pharma-transition);
}

.list-group-item-action:hover {
    color: #ffffff !important;
    background-color: var(--pharma-sidebar-hover) !important;
    border-left-color: var(--pharma-secondary);
}

.list-group-item-action.active {
    color: #ffffff !important;
    background-color: var(--pharma-primary) !important;
    border-left-color: var(--pharma-secondary);
    font-weight: 600;
}

/* Page Content Styling */
#page-content-wrapper {
    width: 100%;
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--pharma-transition);
}

/* Topbar Styling */
.topbar {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid #e2e8f0;
}

#menu-toggle {
    background: var(--pharma-primary-light);
    color: var(--pharma-primary);
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    transition: var(--pharma-transition);
}

#menu-toggle:hover {
    background: var(--pharma-primary);
    color: #ffffff;
}

/* Dashboard Cards */
.dashboard-card {
    background: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: var(--pharma-card-shadow);
    transition: var(--pharma-transition);
    overflow: hidden;
    position: relative;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.dashboard-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--card-color, var(--pharma-primary));
}

.dashboard-card .card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background-color: var(--card-light-color, var(--pharma-primary-light));
    color: var(--card-color, var(--pharma-primary));
}

/* Tables and DataTables Styling */
.table-responsive-custom {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--pharma-card-shadow);
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    width: 100% !important;
}

.table-responsive-custom table th,
.table-responsive-custom table td {
    white-space: nowrap !important;
}

table.dataTable {
    border-collapse: collapse !important;
    width: 100% !important;
}

table.dataTable thead th {
    background-color: #f1f5f9 !important;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #cbd5e1 !important;
    padding: 14px 12px !important;
    position: sticky;
    top: 0;
    z-index: 10;
}

table.dataTable tbody td {
    padding: 16px 12px !important;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    vertical-align: middle;
}

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

/* Custom Status Badges */
.badge-status {
    padding: 0.4rem 0.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    display: inline-block;
}

.badge-status.status-pending {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-status.status-approved, .badge-status.status-active {
    background-color: #dcfce7;
    color: #15803d;
}

.badge-status.status-rejected, .badge-status.status-inactive {
    background-color: #fee2e2;
    color: #b91c1c;
}

.badge-status.status-assigned {
    background-color: #e0f2fe;
    color: #0369a1;
}

.badge-status.status-started {
    background-color: #fae8ff;
    color: #a21caf;
}

.badge-status.status-process {
    background-color: #ffedd5;
    color: #c2410c;
}

.badge-status.status-complete {
    background-color: #dcfce7;
    color: #166534;
}

/* Buttons Styling */
.btn-primary {
    background-color: var(--pharma-primary);
    border-color: var(--pharma-primary);
    box-shadow: 0 4px 6px -1px rgba(15, 76, 129, 0.2);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #0c3d69;
    border-color: #0c3d69;
}

.btn-accent {
    background-color: var(--pharma-secondary);
    border-color: var(--pharma-secondary);
    color: white;
}

.btn-accent:hover {
    background-color: #008fae;
    border-color: #008fae;
    color: white;
}

/* WhatsApp Buttons */
.btn-whatsapp {
    background-color: #25d366;
    color: white;
    font-weight: 500;
}

.btn-whatsapp:hover {
    background-color: #128c7e;
    color: white;
}

/* Forms styling */
.form-control:focus, .form-select:focus {
    border-color: var(--pharma-primary);
    box-shadow: 0 0 0 0.25rem rgba(15, 76, 129, 0.15);
}

.form-label {
    font-weight: 550;
    color: #475569;
    font-size: 0.9rem;
}

/* Auth Pages */
.auth-bg {
    background: linear-gradient(135deg, #0f4c81 0%, #132238 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Micro-animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Footer Section */
footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.85rem;
}
