/*
 * Artisan Plus - Custom SaaS Theme & Visual Style Override Sheet
 * Purpose: Restores original modern SaaS interface aesthetics for field service core.
 * Complies with Bootstrap 5 compatibility, clean grids, bold spacing, and touch-ready inputs.
 */

:root {
    --primary: #0f172a;       /* Deep slate/navy charcoal base */
    --primary-light: #1e293b; /* Dark card hover / navigation state */
    --primary-bg: #f8fafc;    /* Modern soft gray off-white */
    --accent: #f59e0b;        /* Vibrant Amber accent color (spark/energy) */
    --accent-glow: rgba(245, 158, 11, 0.15);
    --border-color: #e2e8f0;  /* Fine border separator line */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    --card-shadow-hover: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.06);
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --border-radius: 12px;
}

/* Core Document Overrides */
body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

/* Elegant Sidebar & Layout Classes */
.artisan-sidebar {
    width: 280px;
    background-color: var(--primary) !important;
    border-right: 3px solid var(--accent);
    min-height: 100vh;
    z-index: 1010;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: fixed;
    top: 0;
    left: 0;
}

/* Sidebar navigation links */
.sidebar-link {
    color: #94a3b8;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.sidebar-link i {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

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

.sidebar-link:hover i {
    transform: translateX(2px);
}

.sidebar-link.active {
    color: #ffffff !important;
    background-color: var(--accent) !important;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.25);
}

.sidebar-link.active i {
    color: var(--primary) !important;
}

/* Page content area adjusts for fixed sidebar on large viewports */
@media (min-width: 992px) {
    .artisan-content-area {
        margin-left: 280px;
    }
}

@media (max-width: 991.98px) {
    .artisan-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        border-right: none;
        border-bottom: 3px solid var(--accent);
    }
}

/* Navbar top adjustment */
header.navbar {
    z-index: 1000;
    height: 70px;
    background: #ffffff !important;
}

/* Brand Text Shadowing */
.navbar-brand span {
    color: var(--accent) !important;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Modern Connection HUD Status Badge & User Tags */
.sync-badge {
    border-radius: 9999px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 6px 14px !important;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sync-badge .status-marker {
    box-shadow: 0 0 6px currentColor;
    animation: pulse-indicator 2s infinite ease-in-out;
}

@keyframes pulse-indicator {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.25); }
}

/* Beautiful Premium Card Layouts & Bento boxes */
.card {
     background-color: #ffffff !important;
     border: 1px solid var(--border-color) !important;
     border-radius: var(--border-radius) !important;
     box-shadow: var(--card-shadow) !important;
     transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
     overflow: hidden;
}

.card:hover {
     box-shadow: var(--card-shadow-hover) !important;
}

.card-header {
     background: #ffffff !important;
     border-bottom: 1px solid var(--border-color) !important;
     padding: 1.25rem 1.5rem !important;
}

.card-body {
     padding: 1.5rem !important;
}

/* Quick Action Cards */
.bento-quick-action {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px dashed var(--border-color) !important;
    background: #f8fafc !important;
    text-decoration: none !important;
}

.bento-quick-action:hover {
    border-color: var(--accent) !important;
    background: #ffffff !important;
    transform: translateY(-2px);
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
     color: var(--primary);
     font-weight: 700;
     letter-spacing: -0.02em;
}

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

/* Buttons Upgrade */
.btn {
     border-radius: 8px !important;
     font-weight: 600 !important;
     padding: 10px 20px;
     letter-spacing: -0.01em;
     transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-artisan {
     background: var(--primary) !important;
     color: #ffffff !important;
     border: 1px solid var(--primary-light) !important;
     box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06);
}

.btn-artisan:hover {
     background: var(--primary-light) !important;
     border-color: #334155 !important;
     transform: translateY(-1px);
     box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-outline-dark {
     border-color: var(--primary) !important;
     color: var(--primary) !important;
}

.btn-outline-dark:hover {
     background: var(--primary) !important;
     color: #ffffff !important;
}

.btn-warning {
     background-color: var(--accent) !important;
     border-color: var(--accent) !important;
     color: var(--primary) !important;
}

.btn-warning:hover {
     background-color: #d97706 !important;
     border-color: #d97706 !important;
     color: #ffffff !important;
     box-shadow: 0 4px 12px var(--accent-glow);
}

/* Elegant Table Layouts for Dense/Readable Screen Controls */
.table-responsive {
     border-radius: var(--border-radius);
     overflow: hidden;
}

.table {
     margin-bottom: 0 !important;
}

.table thead th {
     background-color: #f8fafc !important;
     border-bottom: 2px solid var(--border-color) !important;
     color: var(--text-muted) !important;
     font-size: 0.725rem !important;
     font-weight: 700 !important;
     letter-spacing: 0.05em;
     padding: 14px 16px !important;
     text-transform: uppercase;
}

.table tbody tr {
     transition: background-color 0.15s ease;
}

.table tbody tr:hover {
     background-color: #fafbfc !important;
}

.table tbody td {
     padding: 16px !important;
     border-bottom: 1px solid var(--border-color) !important;
     vertical-align: middle;
}

/* Interactive form inputs */
.form-control, .form-select {
     border-radius: 8px !important;
     border: 1px solid #cbd5e1 !important;
     padding: 10px 14px !important;
     font-size: 0.875rem !important;
     transition: all 0.2s ease !important;
}

.form-control:focus, .form-select:focus {
     border-color: var(--accent) !important;
     box-shadow: 0 0 0 3px var(--accent-glow) !important;
     outline: none !important;
}

.form-label {
     font-weight: 600 !important;
     color: var(--primary) !important;
     margin-bottom: 6px !important;
     letter-spacing: 0.02em;
}

/* Custom Tabs & Pill Controllers */
.nav-pills .nav-link {
     border-radius: 8px !important;
     color: var(--text-main) !important;
     font-weight: 600 !important;
     transition: all 0.2s ease;
     border: 1px solid transparent;
}

.nav-pills .nav-link.active {
     background-color: var(--primary) !important;
     color: #ffffff !important;
     border-color: var(--primary) !important;
     box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
}

/* Beautiful Custom Badges */
.badge {
     padding: 6px 12px !important;
     border-radius: 6px !important;
     font-weight: 600 !important;
     letter-spacing: 0.02em;
     font-size: 11px !important;
}

.badge.bg-success {
     background-color: #10b981 !important;
     color: #ffffff !important;
}

.badge.bg-danger {
     background-color: #ef4444 !important;
     color: #ffffff !important;
}

.badge.bg-info {
     background-color: #3b82f6 !important;
     color: #ffffff !important;
}

/* Compact alerts styling */
.alert {
     border-radius: 12px !important;
     border: none !important;
     padding: 14px 18px !important;
}

.alert-danger {
     background-color: #fef2f2 !important;
     color: #991b1b !important;
     border-left: 4px solid #ef4444 !important;
}

.alert-warning {
     background-color: #fffbeb !important;
     color: #92400e !important;
     border-left: 4px solid #f59e0b !important;
}

.alert-info {
     background-color: #f0f9ff !important;
     color: #075985 !important;
     border-left: 4px solid #0ea5e9 !important;
}

/* Tech dashboard & tracking feeds */
.tech-workflow-card {
    border-left: 4px solid var(--accent) !important;
}

.text-xxs {
    font-size: 0.7rem !important;
}

/* Kanban column states */
.kanban-col {
    background: #f1f5f9;
    padding: 16px;
    border-radius: var(--border-radius);
    min-height: 400px;
}
.kanban-item {
    background: #ffffff;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-left: 3.5px solid var(--border-color);
}
.kanban-item:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transform: translateY(-1px);
}
