/* ╔══════════════════════════════════════════════╗
   ║  DevFlink ERP — Master Theme                 ║
   ║  Clean, Simple, Professional                  ║
   ╚══════════════════════════════════════════════╝ */

:root{
  --df-blue-950:#07102a;
  --df-blue-900:#0b1733;
  --df-blue-850:#0e1f44;
  --df-blue-800:#112a5a;
  --df-blue-700:#1c3f8f;
  --df-accent:#2f7dff;
  --df-text:#eaf2ff;
  --df-muted:rgba(234,242,255,.72);
  --df-border:rgba(255,255,255,.10);
  --df-body:#f4f7fb;
  --df-card:#ffffff;
  --df-font:'Inter','Source Sans Pro',-apple-system,sans-serif;
  --df-radius:12px;
  --df-shadow:0 4px 24px rgba(16,24,40,.06);
}

/* ═══ BASE ═══ */
body.devflink-theme{
  background:var(--df-body);
  font-family:var(--df-font);
  font-size:14px;
  color:rgba(16,24,40,.88);
  -webkit-font-smoothing:antialiased;
}

/* ═══ TOP HEADER BAR ═══ */
body.devflink-theme .main-header.navbar{
  background:var(--df-blue-900)!important;
  border-bottom:1px solid rgba(255,255,255,.06)!important;
  min-height:54px;
  padding:0 16px;
}
body.devflink-theme .df-topbar-right{
  display:flex;
  align-items:center;
  gap:4px;
}
body.devflink-theme .df-topbar-btn{
  width:38px;
  height:38px;
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  color:rgba(234,242,255,.80)!important;
  transition:all .16s;
  padding:0!important;
  font-size:15px;
  position:relative;
}
body.devflink-theme .df-topbar-btn:hover{
  background:rgba(255,255,255,.10)!important;
  color:#fff!important;
}
body.devflink-theme .df-topbar-btn--alert:hover{
  background:rgba(239,68,68,.18)!important;
  color:#fca5a5!important;
}
body.devflink-theme .df-badge{
  position:absolute;
  top:4px;right:4px;
  background:#ef4444;
  color:#fff;
  font-size:10px;
  font-weight:700;
  width:18px;height:18px;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  line-height:1;
}

/* POS chip */
body.devflink-theme .df-topbar-chip{
  display:inline-flex!important;
  align-items:center;
  gap:6px;
  padding:6px 14px!important;
  border-radius:10px;
  background:rgba(47,125,255,.16)!important;
  color:#a5c9ff!important;
  font-weight:600;
  font-size:13px;
  transition:all .16s;
}
body.devflink-theme .df-topbar-chip:hover{
  background:rgba(47,125,255,.26)!important;
  color:#fff!important;
}

/* Translate widget */
body.devflink-theme .df-translate-wrap{
  cursor:pointer;
  overflow:hidden;
}
body.devflink-theme .df-translate-widget{
  position:absolute;
  top:0;left:0;
  width:100%;height:100%;
  opacity:0;
  cursor:pointer;
}
body.devflink-theme .df-translate-widget .goog-te-gadget-simple{
  background:transparent!important;
  border:none!important;
  font-size:0!important;
  width:100%;height:100%;
  display:block;
  cursor:pointer;
}

/* Fullscreen */
body.devflink-theme #dfFullscreen:hover i{
  transform:scale(1.1);
}

/* User dropdown trigger */
body.devflink-theme .df-topbar-user{
  display:inline-flex!important;
  align-items:center;
  gap:8px;
  padding:4px 10px 4px 4px!important;
  border-radius:10px;
  color:rgba(234,242,255,.90)!important;
  transition:all .16s;
  font-weight:500;
  font-size:13px;
}
body.devflink-theme .df-topbar-user:hover{
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
}
body.devflink-theme .df-topbar-avatar{
  width:32px;height:32px;
  border-radius:9px;
  background:rgba(47,125,255,.22);
  display:flex;align-items:center;justify-content:center;
  color:#a5c9ff;
  font-size:14px;
}

/* User dropdown menu */
body.devflink-theme .df-dropdown{
  border:1px solid rgba(16,24,40,.08)!important;
  border-radius:var(--df-radius)!important;
  box-shadow:0 12px 40px rgba(16,24,40,.14)!important;
  background:#fff!important;
  padding:0!important;
  min-width:220px;
  overflow:hidden;
}
body.devflink-theme .df-dropdown-header{
  padding:14px 16px 10px;
  display:flex;flex-direction:column;gap:2px;
}
body.devflink-theme .df-dropdown-header strong{
  font-size:14px;color:rgba(16,24,40,.90);
}
body.devflink-theme .df-dropdown-header small{
  font-size:12px;color:rgba(16,24,40,.50);
}
body.devflink-theme .df-dropdown .dropdown-item{
  padding:10px 16px;
  font-size:13px;
  color:rgba(16,24,40,.78)!important;
  display:flex;align-items:center;gap:10px;
  transition:all .12s;
}
body.devflink-theme .df-dropdown .dropdown-item:hover{
  background:rgba(47,125,255,.06)!important;
  color:var(--df-accent)!important;
}
body.devflink-theme .df-dropdown .dropdown-item i{
  width:16px;text-align:center;font-size:13px;opacity:.7;
}
body.devflink-theme .df-dropdown .dropdown-divider{
  border-color:rgba(16,24,40,.06)!important;
  margin:0;
}
body.devflink-theme .df-dropdown-logout{
  color:#ef4444!important;
}
body.devflink-theme .df-dropdown-logout:hover{
  background:rgba(239,68,68,.06)!important;
  color:#ef4444!important;
}

/* ═══ SIDEBAR ═══ */
body.devflink-theme .main-sidebar{
  background:var(--df-blue-950)!important;
  border-right:1px solid rgba(0,0,0,.10);
  box-sizing:border-box;
}
body.devflink-theme .brand-link{
  background:var(--df-blue-950)!important;
  border-bottom:1px solid rgba(255,255,255,.06)!important;
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  height:96px;
  box-sizing:border-box;
  overflow:hidden;
}
/* Sidebar logo image (uploaded company logo) */
body.devflink-theme .brand-link .brand-image,
body.devflink-theme .brand-link .df-brand-logo{
  border-radius:8px;
  max-height:78px;
  max-width:220px;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  display:block;
  float:none!important;
  margin:0!important;
}
/* Fallback compact logo chip when no company logo uploaded */
body.devflink-theme .df-brand-fallback{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:64px;
  height:64px;
  border-radius:14px;
  background:#ffffff;
}
body.devflink-theme .df-brand-fallback-icon{
  color:var(--df-blue-800);
  font-size:30px;
}
body.devflink-theme .sidebar{
  padding-top:8px;
}
body.devflink-theme .nav-sidebar .nav-link{
  color:rgba(234,242,255,.78)!important;
  border-radius:10px;
  margin:2px 10px;
  padding:9px 14px;
  display:flex;
  align-items:center;
  font-size:13.5px;
  font-weight:500;
  transition:all .14s;
}
body.devflink-theme .nav-sidebar .nav-link:hover{
  background:rgba(255,255,255,.06)!important;
  color:#fff!important;
}
body.devflink-theme .nav-sidebar .nav-link.active,
body.devflink-theme .nav-sidebar .nav-link.active.menu-open{
  background:rgba(47,125,255,.16)!important;
  color:#fff!important;
  border:1px solid rgba(47,125,255,.28);
}
body.devflink-theme .nav-sidebar .nav-icon{
  color:rgba(234,242,255,.68)!important;
  font-size:15px;
  width:22px;
  min-width:22px;
  text-align:center;
  margin-right:8px;
}
body.devflink-theme .nav-sidebar .nav-link.active .nav-icon{
  color:#fff!important;
}
body.devflink-theme .nav-treeview{
  padding-left:4px;
}
body.devflink-theme .nav-treeview .nav-link{
  margin-left:16px;
  background:transparent!important;
  padding:7px 14px;
  font-size:13px;
}
body.devflink-theme .nav-treeview .nav-link .nav-icon{
  font-size:8px;
}
body.devflink-theme .nav-sidebar .nav-link p{
  font-size:13.5px;
  margin:0;
}
body.devflink-theme .nav-sidebar>.nav-item>.nav-link>.right{
  color:rgba(234,242,255,.40);
}

/* ═══ FOOTER ═══ */
body.devflink-theme .main-footer{
  background:#fff!important;
  border-top:1px solid rgba(16,24,40,.06)!important;
  color:rgba(16,24,40,.55)!important;
  font-size:13px;
  padding:14px 20px;
}
body.devflink-theme .main-footer a{
  color:var(--df-accent)!important;
  font-weight:600;
}

/* ═══ CARDS ═══ */
body.devflink-theme .card{
  border-radius:var(--df-radius);
  box-shadow:var(--df-shadow);
  border:1px solid rgba(16,24,40,.06);
}
body.devflink-theme .card-header{
  border-bottom:1px solid rgba(16,24,40,.06);
  background:transparent;
  padding:16px 20px;
}

/* ═══ CONTENT AREA ═══ */
body.devflink-theme .content-header h1{
  font-weight:700;
  font-size:20px;
  letter-spacing:-.2px;
}
body.devflink-theme .breadcrumb{
  font-size:13px;
}
body.devflink-theme .breadcrumb-item a{
  color:var(--df-accent);
}

/* ═══ BUTTONS ═══ */
body.devflink-theme .btn{
  border-radius:10px;
  font-weight:600;
  font-size:13px;
  padding:8px 16px;
  transition:all .14s;
}
body.devflink-theme .btn-primary{
  background:var(--df-accent);
  border-color:var(--df-accent);
}
body.devflink-theme .btn-primary:hover{
  background:#1a6bef;
  border-color:#1a6bef;
}
body.devflink-theme .btn.btn-xs,
body.devflink-theme .btn.btn-sm{
  border-radius:9px;
  padding:5px 10px;
  font-size:12px;
}

/* ═══ TABLES ═══ */
body.devflink-theme .table{
  background:#fff;
  font-size:13.5px;
}
body.devflink-theme .table thead th{
  background:#f7f9fc;
  border-bottom:2px solid rgba(16,24,40,.08)!important;
  color:rgba(16,24,40,.70);
  font-weight:700;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.4px;
  padding:12px 14px;
}
body.devflink-theme .table td{
  vertical-align:middle;
  padding:10px 14px;
  color:rgba(16,24,40,.78);
}
body.devflink-theme .table-bordered{
  border-color:rgba(16,24,40,.08)!important;
}
body.devflink-theme .table-bordered td,
body.devflink-theme .table-bordered th{
  border-color:rgba(16,24,40,.08)!important;
}
body.devflink-theme .table tbody tr:hover{
  background:rgba(47,125,255,.02);
}
body.devflink-theme .table td,.table th{
  border-top-color:rgba(16,24,40,.06)!important;
}

/* ═══ DATATABLES ═══ */
body.devflink-theme .dataTables_wrapper .dataTables_length select,
body.devflink-theme .dataTables_wrapper .dataTables_filter input{
  border-radius:10px;
  border:1px solid rgba(16,24,40,.12);
  padding:7px 12px;
  font-size:13px;
  transition:border .16s;
}
body.devflink-theme .dataTables_wrapper .dataTables_filter input:focus{
  border-color:var(--df-accent);
  box-shadow:0 0 0 3px rgba(47,125,255,.08);
  outline:none;
}
body.devflink-theme .dataTables_info{
  font-size:13px;
  color:rgba(16,24,40,.55);
}
body.devflink-theme .page-item.active .page-link{
  background:var(--df-accent);
  border-color:var(--df-accent);
}
body.devflink-theme .page-link{
  border-radius:8px!important;
  margin:0 2px;
  font-size:13px;
}

body.devflink-theme .dt-buttons .btn{
  background:#f7f9fc!important;
  border:1px solid rgba(16,24,40,.10)!important;
  color:rgba(16,24,40,.72)!important;
  box-shadow:none!important;
  font-weight:500;
  font-size:12.5px;
}
body.devflink-theme .dt-buttons .btn:hover{
  background:#eef2ff!important;
  border-color:rgba(47,125,255,.25)!important;
  color:var(--df-accent)!important;
}

/* ═══ FORMS ═══ */
body.devflink-theme .form-control{
  border-radius:10px;
  border:1px solid rgba(16,24,40,.12);
  font-size:14px;
  padding:8px 12px;
  transition:border .16s,box-shadow .16s;
}
body.devflink-theme .form-control:focus{
  border-color:var(--df-accent);
  box-shadow:0 0 0 3px rgba(47,125,255,.08);
}

/* ═══ MODALS ═══ */
body.devflink-theme .modal-content{
  border-radius:var(--df-radius);
  border:none;
  box-shadow:0 20px 60px rgba(16,24,40,.18);
}
body.devflink-theme .modal-header{
  border-bottom:1px solid rgba(16,24,40,.06);
  padding:16px 20px;
}
body.devflink-theme .modal-footer{
  border-top:1px solid rgba(16,24,40,.06);
}

/* ═══ CARD HEADER LAYOUT ═══ */
body.devflink-theme .df-card-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
body.devflink-theme .df-card-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
body.devflink-theme .df-card-title{
  font-weight:700;
  font-size:15px;
  color:rgba(16,24,40,.88);
}

/* ═══ ACTION BUTTONS ═══ */
body.devflink-theme .df-actions{
  display:inline-flex;
  gap:6px;
  flex-wrap:wrap;
}
body.devflink-theme .df-action{
  width:32px;height:32px;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:9px;
  padding:0;border:none;
  transition:all .14s;
  cursor:pointer;
}
body.devflink-theme .df-action i{font-size:13px;}
body.devflink-theme .df-action.df-action--view{background:rgba(47,125,255,.08);color:#2f7dff;}
body.devflink-theme .df-action.df-action--view:hover{background:rgba(47,125,255,.16);}
body.devflink-theme .df-action.df-action--edit{background:rgba(16,185,129,.08);color:#10b981;}
body.devflink-theme .df-action.df-action--edit:hover{background:rgba(16,185,129,.16);}
body.devflink-theme .df-action.df-action--delete{background:rgba(239,68,68,.08);color:#ef4444;}
body.devflink-theme .df-action.df-action--delete:hover{background:rgba(239,68,68,.16);}
body.devflink-theme .df-action.df-action--barcode{background:rgba(245,158,11,.08);color:#f59e0b;}
body.devflink-theme .df-action.df-action--barcode:hover{background:rgba(245,158,11,.16);}

/* ═══ DASHBOARD KPI ═══ */
body.devflink-theme .df-kpi{
  border:1px solid rgba(16,24,40,.06);
  border-radius:var(--df-radius);
  background:#fff;
  padding:18px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  height:100%;
  transition:box-shadow .16s;
}
body.devflink-theme .df-kpi:hover{
  box-shadow:0 6px 20px rgba(16,24,40,.08);
}
body.devflink-theme .df-kpi__meta{display:flex;flex-direction:column;gap:2px;}
body.devflink-theme .df-kpi__label{color:rgba(16,24,40,.55);font-size:12.5px;font-weight:500;}
body.devflink-theme .df-kpi__value{font-size:22px;font-weight:800;color:rgba(16,24,40,.90);line-height:1.1;}
body.devflink-theme .df-kpi__icon{
  width:44px;height:44px;
  border-radius:var(--df-radius);
  display:flex;align-items:center;justify-content:center;
  background:rgba(47,125,255,.08);color:var(--df-accent);
  flex:0 0 auto;font-size:18px;
}

/* ═══ CALCULATOR POPUP ═══ */
.df-calc-overlay{
  position:fixed;top:0;left:0;width:100%;height:100%;
  background:rgba(7,16,42,.40);
  z-index:9999;
  display:flex;align-items:center;justify-content:center;
}
.df-calc-box{
  background:#fff;border-radius:16px;
  width:280px;padding:20px;
  box-shadow:0 20px 60px rgba(0,0,0,.18);
}
.df-calc-head{
  display:flex;justify-content:space-between;align-items:center;
  margin-bottom:14px;font-weight:700;font-size:15px;color:rgba(16,24,40,.85);
}
.df-calc-close{
  border:none;background:none;font-size:22px;cursor:pointer;
  color:rgba(16,24,40,.40);transition:color .14s;
}
.df-calc-close:hover{color:#ef4444;}
.df-calc-display{
  width:100%;padding:12px;font-size:20px;
  text-align:right;border:1px solid rgba(16,24,40,.10);
  border-radius:10px;margin-bottom:12px;background:#f7f9fc;
  font-weight:600;color:rgba(16,24,40,.88);
}
.df-calc-keys{
  display:grid;grid-template-columns:repeat(4,1fr);gap:8px;
}
.df-calc-keys button{
  padding:12px;border:none;border-radius:10px;
  font-size:16px;font-weight:600;cursor:pointer;
  background:#f4f7fb;color:rgba(16,24,40,.82);
  transition:all .12s;
}
.df-calc-keys button:hover{background:#e8ecf4;}
.df-calc-op{background:#eef2ff!important;color:var(--df-accent)!important;}
.df-calc-op:hover{background:#dde5ff!important;}
.df-calc-eq{background:var(--df-accent)!important;color:#fff!important;}
.df-calc-eq:hover{background:#1a6bef!important;}
.df-calc-clear{background:#fef2f2!important;color:#ef4444!important;font-size:14px!important;}
.df-calc-clear:hover{background:#fee2e2!important;}

/* ═══ SCROLLBAR ═══ */
body.devflink-theme ::-webkit-scrollbar{width:6px;height:6px;}
body.devflink-theme ::-webkit-scrollbar-track{background:transparent;}
body.devflink-theme ::-webkit-scrollbar-thumb{background:rgba(16,24,40,.14);border-radius:10px;}
body.devflink-theme ::-webkit-scrollbar-thumb:hover{background:rgba(16,24,40,.24);}

/* ═══ ALERTS ═══ */
body.devflink-theme .alert{
  border-radius:var(--df-radius);
  border:none;
  font-size:14px;
}

/* ═══ SELECT2 OVERRIDE ═══ */
body.devflink-theme .select2-container--default .select2-selection--single{
  border-radius:10px!important;
  border-color:rgba(16,24,40,.12)!important;
  height:38px!important;
}
body.devflink-theme .select2-container--default .select2-selection--single .select2-selection__rendered{
  line-height:36px!important;
  color:rgba(16,24,40,.78);
}
body.devflink-theme .select2-container--default .select2-selection--single .select2-selection__arrow{
  height:36px!important;
}
body.devflink-theme .select2-dropdown{
  border-radius:10px;
  border-color:rgba(16,24,40,.10);
  box-shadow:0 8px 30px rgba(16,24,40,.12);
}
body.devflink-theme .select2-results__option--highlighted{
  background:rgba(47,125,255,.10)!important;
  color:var(--df-accent)!important;
}

/* ═══ RESPONSIVE ═══ */
@media(max-width:768px){
  body.devflink-theme .df-topbar-right{gap:2px;}
  body.devflink-theme .df-topbar-btn{width:34px;height:34px;font-size:14px;}
}
