/*
 * UI Improvements — 2026-02-24
 * To revert: remove this file and the <link> in app/Views/layouts/default.php
 *
 * Brand orange palette:
 *   primary:  #da6f29
 *   dark:     #c5621f
 *   light:    #fff3eb  (backgrounds / tints)
 *   alpha-12: rgba(218,111,41,0.12)
 *   alpha-08: rgba(218,111,41,0.08)
 */

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

/* ========================================
   BASE TYPOGRAPHY
   ======================================== */
body {
    font-family: 'Inter', 'Open Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f0f2f5;
}

/* ========================================
   HEADER / NAVBAR
   ======================================== */
.main-header .navbar {
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border-bottom: 2px solid #da6f29;
}
.main-header .logo.logo-custom {
    box-shadow: none;
}
/* Credits badge in header */
.nav-cstm .notifications-menu > a {
    background-color: transparent !important;
}
.nav-cstm .notifications-menu > a span {
    font-weight: 600;
    font-size: 14px !important;
    color: #da6f29 !important;
}
/* User avatar ring */
.nav-cstm .tasks-menu > a img {
    transition: box-shadow 0.2s ease;
}
.nav-cstm .tasks-menu > a:hover img {
    box-shadow: 0 0 0 3px rgba(218,111,41,0.4) !important;
}
/* User dropdown */
.nav-cstm .dropdown-menu {
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    padding: 8px 0 !important;
}
.nav-cstm .dropdown-menu .menu li a {
    transition: background 0.15s ease;
    border-radius: 4px;
    margin: 2px 8px;
    padding: 6px 12px !important;
}
.nav-cstm .dropdown-menu .menu li a:hover {
    background: #fff3eb;
}
.nav-cstm .dropdown-menu .menu li a h3 {
    font-size: 14px;
    margin: 0;
    padding: 0;
}

/* ========================================
   SIDEBAR
   ======================================== */
.main-sidebar .sidebar {
    padding-top: 8px;
}
.sidebar-menu > li > a {
    transition: all 0.15s ease;
    border-radius: 4px;
    margin: 2px 8px;
}
.sidebar-menu > li.active > a {
    border-left: 3px solid #da6f29 !important;
    background: rgba(218,111,41,0.08) !important;
}
.sidebar-menu .treeview-menu {
    border-radius: 4px;
}
.sidebar-menu .treeview-menu > li > a {
    transition: color 0.15s ease;
    font-size: 13px;
}
.sidebar-menu .treeview-menu > li.active > a,
.sidebar-menu .treeview-menu > li > a:hover {
    color: #da6f29 !important;
}
/* Sidebar menu icons — orange tint */
.sidebar-menu > li > a > .fa {
    color: rgba(218,111,41,0.6);
}
.sidebar-menu > li.active > a > .fa,
.sidebar-menu > li:hover > a > .fa {
    color: #da6f29;
}

/* ========================================
   CONTENT AREA
   ======================================== */
#page-inner {
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
    padding: 16px 20px;
}

/* ========================================
   BREADCRUMB
   ======================================== */
.breadcrumb {
    background: transparent;
    padding: 10px 0;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 1px solid #f0f0f0;
}
.breadcrumb > li + li:before {
    color: #da6f29;
    content: "\f105" !important;
    font-family: FontAwesome;
    font-size: 11px;
}
.breadcrumb > .active {
    color: #da6f29;
    font-weight: 600;
}

/* ========================================
   TABLES
   ======================================== */
.table {
    border-collapse: separate;
    border-spacing: 0;
}
.table > thead > tr > th {
    background: #fff8f3;
    color: #4b5563;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #da6f29 !important;
    padding: 10px 12px;
    white-space: nowrap;
}
.table > tbody > tr > td {
    padding: 10px 12px;
    vertical-align: middle;
    border-color: #f0f0f0;
    font-size: 13px;
    color: #374151;
}
.table-hover > tbody > tr:hover > td {
    background-color: #fafbfc;
}
/* Zebra striping subtle */
.table > tbody > tr:nth-child(even) > td {
    background-color: #fafafa;
}
.table-hover > tbody > tr:nth-child(even):hover > td {
    background-color: #f5f6f8;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.15s ease;
    border: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn:active {
    transform: translateY(1px);
}
.btn-primary {
    background: #da6f29;
    border-color: #da6f29;
}
.btn-primary:hover,
.btn-primary:focus {
    background: #c5621f;
    border-color: #c5621f;
    box-shadow: 0 2px 6px rgba(218,111,41,0.3);
}
.btn-xs {
    border-radius: 4px;
    padding: 3px 7px;
}
.btn-teal {
    background: #80808029;
    color: #fff;
    border: none;
}
.btn-teal:hover {
    background: #80808050;
    color: #fff;
    box-shadow: 0 2px 6px rgba(128,128,128,0.2);
}

/* ========================================
   FORMS
   ======================================== */
.form-control {
    border-radius: 6px;
    border: 1px solid #d1d5db;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.form-control:focus {
    border-color: #da6f29;
    box-shadow: 0 0 0 3px rgba(218,111,41,0.12);
}
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 32px;
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    border-radius: 8px;
    border: none;
    font-size: 14px;
    padding: 12px 16px;
}
.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left: 4px solid #10b981;
}
.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}
.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
    gap: 4px;
}
.pagination > li > a,
.pagination > li > span {
    border-radius: 6px !important;
    margin: 0 1px;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.15s ease;
}
.pagination > li > a:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #111827;
}
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover {
    background-color: #da6f29 !important;
    border-color: #da6f29 !important;
    border-radius: 6px !important;
}
.pagination > .disabled > span {
    border-radius: 6px !important;
}

/* ========================================
   MODALS
   ======================================== */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
}
.modal-header .modal-title {
    font-weight: 600;
    font-size: 16px;
}
.modal-body {
    padding: 20px;
}
.modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 12px 20px;
    border-radius: 0 0 12px 12px;
}

/* ========================================
   NOTY TOAST OVERRIDES
   ======================================== */
.noty_bar {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
}

/* ========================================
   PANELS & WELLS
   ======================================== */
.panel {
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
}
.panel-heading {
    border-radius: 8px 8px 0 0;
}
.well {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    box-shadow: none;
}

/* ========================================
   SHOWING X TO Y RECORDS TEXT
   ======================================== */
.row.col-md-12 p {
    font-size: 13px;
    color: #6b7280;
    padding-top: 8px;
}

/* ========================================
   SIDEBAR HRs — softer
   ======================================== */
.sidebar hr {
    border: none;
    height: 1px;
    background-color: rgba(255,255,255,0.06) !important;
    margin: 6px 12px !important;
}

/* ========================================
   INLINE EDIT ICONS — smoother
   ======================================== */
.edit-note-btn i.fa-pencil {
    font-size: 12px;
    opacity: 0.5;
    transition: opacity 0.15s ease;
}
tr:hover .edit-note-btn i.fa-pencil {
    opacity: 1;
}

/* ========================================
   SCROLLBAR (webkit)
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* ========================================
   SMOOTH TRANSITIONS ON LINKS
   ======================================== */
a {
    transition: color 0.15s ease;
    color: #c5621f;
}
a:hover,
a:focus {
    color: #da6f29;
}
/* Preserve original colors on all button variants */
a.btn {
    color: inherit;
}
a.btn-teal,
a.btn-teal:hover,
a.btn-teal:focus {
    color: #fff;
}
a.btn-primary,
a.btn-primary:hover,
a.btn-primary:focus {
    color: #fff;
}
a.btn-success,
a.btn-success:hover,
a.btn-success:focus {
    color: #fff;
}
a.btn-danger,
a.btn-danger:hover,
a.btn-danger:focus {
    color: #fff;
}
a.btn-warning,
a.btn-warning:hover,
a.btn-warning:focus {
    color: #fff;
}
a.btn-info,
a.btn-info:hover,
a.btn-info:focus {
    color: #fff;
}

/* ========================================
   TOOLTIPS — if used with .tooltips class
   ======================================== */
.tooltip-inner {
    border-radius: 6px;
    font-size: 12px;
    padding: 6px 10px;
}

/* ========================================
   ORANGE ACCENT — LABELS & BADGES
   ======================================== */
.label-primary,
.badge-primary {
    background-color: #da6f29 !important;
}
.label-info {
    background-color: #fff3eb !important;
    color: #da6f29 !important;
}

/* ========================================
   ORANGE ACCENT — LINKS IN TABLES
   ======================================== */
.table a {
    color: #c5621f;
    font-weight: 500;
}
.table a:hover {
    color: #da6f29;
}

/* ========================================
   ORANGE ACCENT — CONTROL LABELS
   ======================================== */
.control-label {
    color: #374151;
    font-weight: 600;
    font-size: 13px;
}
.symbol.required {
    color: #da6f29;
}

/* ========================================
   ORANGE ACCENT — PAGE HEADINGS (h4/h5 in page-inner)
   ======================================== */
#page-inner > .row:first-child h4,
#page-inner h4[style*="font-weight:600"] {
    color: #374151;
}

/* ========================================
   ORANGE ACCENT — SCROLLBAR THUMB
   ======================================== */
::-webkit-scrollbar-thumb {
    background: rgba(218,111,41,0.3);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(218,111,41,0.5);
}

/* ========================================
   ORANGE ACCENT — SELECTION HIGHLIGHT
   ======================================== */
::selection {
    background: rgba(218,111,41,0.2);
    color: #374151;
}

/* ========================================
   ORANGE ACCENT — MODAL HEADER
   ======================================== */
.modal-header {
    background: #fff8f3;
    border-bottom: 2px solid rgba(218,111,41,0.15);
}

/* ========================================
   ORANGE ACCENT — BTN-DEFAULT (subtle)
   ======================================== */
.btn-default {
    border: 1px solid #d1d5db;
    color: #374151;
}
.btn-default:hover {
    background: #fff3eb;
    border-color: #da6f29;
    color: #c5621f;
}

/* ========================================
   ORANGE ACCENT — CHECKBOX / RADIO
   ======================================== */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
    accent-color: #da6f29;
}
