/* Modern Dark Theme - AdminSoft Premium */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-light: #f8fafc;
    /* Lighter white */
    --text-muted: #cbd5e1;
    /* Lighter gray for better contrast */
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-dark);
    font-family: 'Outfit', sans-serif;
    color: var(--text-light) !important;
    /* Force override Bootstrap */
    min-height: 100vh;
    font-size: 1.15rem; /* Increased text size */
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    color: var(--text-light) !important;
    font-weight: 700;
    letter-spacing: -0.025em;
}

p,
span,
div,
li,
td,
th {
    color: var(--text-light);
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Glassmorphism Cards */
.card,
.card-glass {
    background: rgba(30, 41, 59, 0.7) !important;
    /* Ensure card bg is dark */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    color: var(--text-light) !important;
}

.card-header,
.card-header-glass {
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05) !important;
    padding: 1.5rem;
    border-radius: 16px 16px 0 0;
    color: var(--text-light) !important;
}

/* Form Styling */
.form-control,
.form-select {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-light) !important;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    color: var(--text-light) !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7;
}

.form-label {
    color: var(--text-muted) !important;
}

/* Tables */
.table {
    color: var(--text-light) !important;
    --bs-table-color: var(--text-light);
    --bs-table-bg: transparent;
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.table-hover>tbody>tr:hover>* {
    --bs-table-color-state: var(--text-light) !important;
}

/* Buttons */
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.5);
    color: white !important;
}

/* Sidebar (if used) */
.sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--glass-border);
    height: 100vh;
    position: fixed;
    width: 260px;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

.main-content {
    margin-left: 260px;
    /* Match sidebar width */
    padding: 2rem;
}

.nav-link {
    color: var(--text-muted) !important;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
}

.nav-link i {
    width: 24px;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    /* Fallback */
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
}

.border-glass {
    border: 1px solid var(--glass-border) !important;
}

.border-end-8 {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

.alert-warning {
    background-color: transparent !important;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.12) !important;
    border-color: rgba(13, 202, 240, 0.3) !important;
    color: #7ee8ff !important;
}

.alert-info strong, .alert-info a {
    color: #b8f4ff !important;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}
.blink-dot {
    animation: blink 0.8s infinite;
}

.card-header-tabs .nav-link.active {
    background: transparent !important;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* User Dropdown - Truncate long names */
.sidebar .dropdown .user-info {
    max-width: 180px;
    min-width: 0;
}

.sidebar .dropdown .user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.sidebar .dropdown .user-branch {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* Badge personalizado para productos preparados */
.badge.bg-purple {
    background-color: #9333ea !important;
    color: white !important;
}