/* Law Firm Modern & Professional Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Brand: Elegant Navy & Slate with subdued Gold/Accent */
  --brand: #1e3a8a;      /* deep professional navy */
  --brand-600: #1e40af;  /* hover state */
  --brand-700: #172554;  /* active state */
  --accent: #d4af37;     /* subtle gold accent for a law firm feel, or deep teal  */
  
  /* Neutrals & surfaces */
  --bg-soft: #f8fafc;    /* sophisticated cool gray for background */
  --surface: #ffffff;    /* pure white cards */
  --text-muted: #64748b; /* slate gray */
  --neutral-700: #0f172a;/* slate almost black text */
  --radius: 12px;        /* modern rounded edges */

  /* State colors - Professional Mutings */
  --success: #10b981;    /* emerald */
  --warning: #f59e0b;    /* amber */
  --danger:  #ef4444;    /* red */
  --info:    #3b82f6;    /* blue */
}

html, body { 
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, sans-serif; 
    color: #334155;
    background-color: var(--bg-soft);
}

body.layout-fixed .wrapper .content-wrapper {
  background: var(--bg-soft);
}

/* Navbar */
.main-header.navbar {
  background: var(--surface);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02), 0 2px 4px -1px rgba(0,0,0,0.02) !important;
}
.navbar-nav .nav-link { color: #475569; font-weight: 500; }
.navbar-nav .nav-link:hover { color: var(--brand); }

/* Brand / Logo Area */
.brand-link {
  font-weight: 700;
  letter-spacing: .3px;
  background-color: var(--surface) !important;
  color: var(--brand) !important;
  border-bottom: 1px solid rgba(0,0,0,0.05) !important;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}
.brand-image { opacity: 0.9; border-radius: 8px; }
.brand-text {
  color: var(--brand) !important;
  font-weight: 700;
}

/* Sidebar */
.main-sidebar { 
    background-color: var(--surface) !important; 
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.03); 
    border-right: 1px solid rgba(0,0,0,0.04);
}
.sidebar .nav-header { color: #94a3b8; font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; }
.sidebar .nav-sidebar .nav-item>.nav-link {
  border-radius: 8px;
  margin: 2px 12px;
  color: #475569;
  font-weight: 500;
  transition: all 0.2s ease;
}
.sidebar .nav-sidebar .nav-item>.nav-link p { font-size: 0.92rem; }
.sidebar .nav-sidebar .nav-item>.nav-link .nav-icon { color: #64748b; font-size: 1.1rem; }
.sidebar-light-primary .nav-sidebar>.nav-item .nav-link.active {
  background-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.2);
  color: #fff;
}
.sidebar-light-primary .nav-sidebar>.nav-item .nav-link.active .nav-icon { color: #fff; }
.sidebar-light-primary .nav-sidebar>.nav-item>.nav-link:hover:not(.active) {
  background-color: #f1f5f9;
  color: var(--brand-700);
}
.nav-child-indent .nav-treeview>.nav-item>.nav-link { padding-left: 2.2rem; margin: 1px 12px; border-radius: 6px; }

/* Surfaces & Cards */
.card, .info-box, .small-box {
  border: none;
  background-color: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03); }
.card-header {
  background-color: transparent;
  border-bottom: 1px solid #f1f5f9;
  border-top-left-radius: var(--radius) !important;
  border-top-right-radius: var(--radius) !important;
  padding: 1.25rem 1.5rem;
}
.card-title { font-weight: 600; color: var(--neutral-700); font-size: 1.1rem; }
.card-body { padding: 1.5rem; }

/* Buttons */
.btn { border-radius: 8px; font-weight: 500; padding: 0.4rem 1.25rem; transition: all 0.2s; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.85rem; }
.btn-primary { background-color: var(--brand); border-color: var(--brand); }
.btn-primary:hover, .btn-primary:active, .btn-primary:focus { background-color: var(--brand-600); border-color: var(--brand-600); box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.2); transform: translateY(-1px); }
.btn-outline-primary { color: var(--brand); border-color: var(--brand); }
.btn-outline-primary:hover { background-color: var(--brand); color: #fff; }
.btn-success { background-color: var(--success); border-color: var(--success); }
.btn-warning { background-color: var(--warning); border-color: var(--warning); color: #fff; }

/* Tables */
.table th { border-top: none; border-bottom: 2px solid #e2e8f0; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; color: inset; background-color: #f8fafc; }
.table td { vertical-align: middle; border-bottom: 1px solid #f1f5f9; color: #475569; padding: 1rem 0.75rem; }
.table-hover tbody tr:hover { background-color: #f1f5f9; }

/* Forms */
.form-control, .form-select { border-radius: 8px; border: 1px solid #cbd5e1; box-shadow: none; padding: 0.5rem 0.75rem; background-color: #f8fafc; transition: all 0.2s; }
.form-control:focus, .form-select:focus { border-color: var(--brand); background-color: #fff; box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1); }
label { font-weight: 500; color: #334155; margin-bottom: 0.4rem; }

/* Badges */
.badge { font-weight: 600; font-size: 0.75rem; padding: 0.4em 0.8em; border-radius: 6px; letter-spacing: 0.02em; }
.badge-success { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-warning { background-color: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-danger { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.badge-info { background-color: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-primary { background-color: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }

/* Title & Header adjustments */
.content-header h1 { font-weight: 700; color: var(--neutral-700); font-size: 1.5rem; letter-spacing: -0.02em; }
.breadcrumb { background-color: transparent; padding: 0; margin-bottom: 0; }
.breadcrumb-item a { color: var(--brand); font-weight: 500; }

/* Utility */
.text-primary { color: var(--brand) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Pagination Modernization */
.page-item.active .page-link { background-color: var(--brand); border-color: var(--brand); }
.page-link { color: var(--brand); border-radius: 6px; margin: 0 3px; border: 1px solid #e2e8f0; }

/* Select2 Modernization */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background-color: #f8fafc !important;
    min-height: 42px;
}
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1) !important;
    background-color: #fff !important;
}

/* Info Boxes override */
.info-box { align-items: center; padding: 1.25rem; }
.info-box-icon { border-radius: 10px; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.info-box-text { text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; color: #64748b; font-weight: 600; }
.info-box-number { font-size: 1.5rem; font-weight: 700; color: var(--neutral-700); }

/* Fix for standard form-control-sm select boxes */
select.form-control.form-control-sm {
    height: calc(2.25rem + 2px) !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    line-height: 1.5;
}
