/* /css/style.css */
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

:root {
    /* Brand Colors - Enterprise Palette */
    --euclid-primary: #0f172a; /* Slate 900 */
    --euclid-primary-dark: #020617;
    --euclid-accent: #3b82f6; /* Blue 500 */
    --euclid-secondary: #64748b;
    --euclid-success: #10b981;
    --euclid-info: #0ea5e9;
    --euclid-warning: #f59e0b;
    --euclid-danger: #ef4444;
    --euclid-dark: #0f172a;
    --euclid-light: #f8fafc;

    /* Gradients - Rich & Subtle */
    --grad-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --grad-accent: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --grad-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --grad-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --grad-info: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    --grad-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --grad-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --grad-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.5) 100%);

    /* Shadows - Softer & Modern */
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.05);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Base */
body {
    background-color: #f8fafc; /* Slate 50 */
    color: #334155; /* Slate 700 */
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    font-size: 0.925rem; /* Slightly smaller for density */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.025em;
    color: #0f172a;
}

.text-light-muted {
    color: #94a3b8 !important;
}

/* Card Styling - Enterprise */
.card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1rem; /* Consistent spacing */
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    color: #1e293b;
    padding: 0.75rem 1rem;
    border-top-left-radius: var(--radius-md) !important;
    border-top-right-radius: var(--radius-md) !important;
}

.card-body {
    padding: 1rem;
}

.card-title {
    color: #64748b;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* KPI Cards */
.kpi-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--grad-accent);
}

.kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 0.15rem;
}

.kpi-sub {
    font-size: 0.8rem;
    color: #64748b;
}

.kpi-icon {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.25rem;
    opacity: 0.1;
    color: var(--euclid-primary);
}

/* Navbar */
.navbar {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: #0f172a !important;
    letter-spacing: -0.02em;
}

.nav-link {
    color: #64748b !important;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.4rem 0.85rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-link:hover {
    color: #0f172a !important;
    background-color: #f1f5f9;
}

.nav-link.active {
    color: #2563eb !important;
    background-color: #eff6ff;
    font-weight: 600;
}

.nav-link i {
    margin-right: 0.35rem;
    font-size: 0.95rem;
    vertical-align: text-bottom;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--grad-accent);
    border: none;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-color: #e2e8f0;
    color: #475569;
    background-color: #ffffff;
}

.btn-outline-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

/* Forms */
.form-control, .form-select {
    border-color: #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #1e293b;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.6rem 0.75rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.6rem 0.75rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover td {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 9999px;
    font-size: 0.75rem;
}

/* Custom Gradients for Cards */
.bg-grad-primary { background: var(--grad-primary); color: white; }
.bg-grad-accent { background: var(--grad-accent); color: white; }
.bg-grad-success { background: var(--grad-success); color: white; }
.bg-grad-info { background: var(--grad-info); color: white; }
.bg-grad-warning { background: var(--grad-warning); color: white; }
.bg-grad-danger { background: var(--grad-danger); color: white; }
.bg-grad-dark { background: var(--grad-dark); color: white; }

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Utilities */
.shadow-glass { box-shadow: var(--shadow-glass); }
.border-soft { border-color: #e2e8f0 !important; }

/* Kanban Specifics */
.kanban-column .card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

.pipeline-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.pipeline-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

/* Avatar */
.ea-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Responsiveness Helpers */
@media (max-width: 768px) {
    .navbar-brand { font-size: 1rem; }
    .kpi-value { font-size: 1.4rem; }
    .card-body { padding: 0.75rem; }
    
    /* Ensure modals scroll on mobile */
    .modal-dialog {
        margin: 0.5rem;
    }
    .modal-content {
        max-height: calc(100vh - 1rem);
        overflow-y: auto;
    }
}

/* Ensure tables scroll horizontally on small screens */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}