/* ==========================================================================
   Orange Sky — Influencer OS theme
   --------------------------------------------------------------------------
   Loaded AFTER main.css and overrides it. Everything here is keyed to classes
   the existing template already emits (.app-header, .app-sidebar, .tile,
   .btn, .form-control, table, DataTables chrome), so every page picks the new
   look up without its markup being touched.

   Palette: orange / white / black.
   ========================================================================== */

:root{
  --brand:      #F47C20;
  --brand-dk:   #D8620E;
  --brand-dkr:  #B04E08;
  --brand-lt:   #FDEDE0;
  --brand-lt2:  #FAD6B4;
  --brand-glow: rgba(244,124,32,.22);

  --ink:        #17130F;
  --sidebar:    #1C1814;   /* a shade off --ink so the rail reads as its own surface */
  --ink-2:      #2E2822;
  --ink-3:      #564E45;
  --muted:      #857C72;
  --line:       #E9E3DC;
  --line-2:     #F2EDE7;
  --bg:         #F7F4F0;

  --ok:         #1F7A3D;
  --ok-bg:      #E4F5E9;
  --warn:       #8A5A00;
  --warn-bg:    #FFF3DE;
  --bad:        #B3261E;
  --bad-bg:     #FDE9E7;

  --radius:     10px;
  --radius-sm:  7px;
  --shadow:     0 1px 2px rgba(23,19,15,.05), 0 2px 8px rgba(23,19,15,.05);
  --shadow-md:  0 2px 6px rgba(23,19,15,.07), 0 10px 26px rgba(23,19,15,.07);
}

/* --------------------------------------------------------------- base ---- */
body.app{
  background: var(--bg);
  color: var(--ink-2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.app-content{ background: var(--bg); }
a{ color: var(--brand-dk); }
a:hover{ color: var(--brand-dkr); }
h1,h2,h3,h4,h5,h6{ color: var(--ink); font-weight: 600; }
::selection{ background: var(--brand); color:#fff; }

/* ------------------------------------------------------------- header ---- */
/* White bar, with the logo block left as a solid orange column so the brand
   colour reads as one continuous band from the top of the page down the
   sidebar — the sidebar sits behind this bar's first 70px. */
.app.sidebar-mini .app-header,
.app-header{
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  height: 64px;
}
.app-header__logo{
  background: var(--brand);
  color: var(--ink) !important;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .01em;
  width: 230px;
  height: 64px;
  line-height: 64px;
  text-align: center;
}
.app-header__logo:hover{ background: var(--brand); color: var(--ink) !important; text-decoration:none; }

.app-sidebar__toggle{
  color: var(--ink);
  height: 64px;
  line-height: 64px;
  padding: 0 18px;
}
.app-sidebar__toggle:hover{ background: var(--brand-lt); color: var(--brand-dk); }
.app-sidebar__toggle:before{ content:"\f0c9"; font-family: FontAwesome; font-size: 18px; }

.app-nav__item{ color: var(--ink-3); height: 64px; line-height: 64px; padding: 0 16px; }
.app-nav__item:hover{ background: var(--brand-lt); color: var(--brand-dk); }
.app-nav .dropdown-menu{
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 6px;
}
.app-nav .dropdown-item{ border-radius: 5px; padding: 9px 12px; color: var(--ink-2); font-size: 13.5px; }
.app-nav .dropdown-item:hover{ background: var(--brand-lt); color: var(--brand-dk); }

/* ------------------------------------------------------------ sidebar ----
   Dark rail, orange used only as an accent: the logo chip at the top and the
   pill on the current page. A full-height orange column was far too much of
   the brand colour on screen at once. */
.app-sidebar{
  background: var(--sidebar);
  box-shadow: none;
  border-right: 1px solid rgba(255,255,255,.06);
  padding-top: 64px;
  width: 230px;
}
.app-sidebar::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.16); }

.app-sidebar__user{
  padding: 18px 16px;
  margin: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 11px;
}
.app-sidebar__user-avatar{
  width: 42px; height: 42px;
  border: 2px solid var(--brand);
  box-shadow: none;
  margin: 0;
}
.app-sidebar__user-name{
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  margin: 0;
  opacity: 1;
}
.app-sidebar__user-designation{ color: var(--brand) !important; font-size: 12px; }

.app-menu{ padding: 10px 9px; }
.app-menu__item{
  color: rgba(255,255,255,.74);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 12px;
  margin-bottom: 2px;
  border-left: 0;
  border-radius: var(--radius-sm);
  transition: background .15s ease, color .15s ease;
}
.app-menu__item:hover,
.app-menu__item:focus{
  background: rgba(255,255,255,.08);
  border-left: 0;
  color: #fff;
}
.app-menu__item:hover .app-menu__icon{ color: var(--brand); }
.app-menu__item.active{
  background: var(--brand);
  color: var(--ink);
  border-left: 0;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(244,124,32,.32);
}
.app-menu__item.active .app-menu__icon{ color: var(--ink); }
.app-menu__icon{ width: 24px; font-size: 15px; text-align: center; color: rgba(255,255,255,.55); transition: color .15s ease; }
.app-menu__label{ font-size: 14px; }

.treeview.is-expanded [data-toggle='treeview']{
  background: rgba(255,255,255,.08);
  border-left: 0;
  color: #fff;
}
.treeview-menu{ background: rgba(0,0,0,.28); border-radius: var(--radius-sm); margin: 2px 0 6px; padding: 4px; }
.treeview-item{ color: rgba(255,255,255,.66); padding: 8px 12px; border-radius: 5px; font-size: 13.5px; }
.treeview-item:hover{ background: rgba(255,255,255,.08); color: #fff; }
.treeview-item.active{ background: var(--brand); color: var(--ink); font-weight: 600; }
.treeview-item .icon{ font-size: 7px; vertical-align: middle; margin-right: 7px; }
.treeview-indicator{ color: rgba(255,255,255,.45); }

/* -------------------------------------------------------- page header ---- */
.app-title{
  border-bottom: 1px solid var(--line);
  margin: -16px -15px 22px;
  padding: 20px 22px;
  background: #fff;
}
.app-title h1{ font-size: 22px; font-weight: 700; color: var(--ink); margin: 0; }
.app-title h1 i{ color: var(--brand); margin-right: 7px; }
.app-title p{ color: var(--muted); font-size: 13px; margin: 3px 0 0; }
.app-breadcrumb{ background: none; padding: 0; margin: 0; font-size: 13px; }

/* --------------------------------------------------------------- tile ---- */
.tile{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 22px;
}
.tile:hover{ box-shadow: var(--shadow); }
.tile-title{
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line-2);
}
.tile-footer{ border-top: 1px solid var(--line-2); padding-top: 15px; margin-top: 6px; }

/* ------------------------------------------------------------ buttons ---- */
.btn{
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 17px;
  border-width: 1px;
  transition: all .15s ease;
  box-shadow: none !important;
}
.btn:focus{ outline: none; }
.btn i{ margin-right: 5px; }
.btn i:only-child{ margin-right: 0; }

.btn-primary{ background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active{ background: var(--brand-dk); border-color: var(--brand-dk); color:#fff; }

.btn-secondary{ background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:not(:disabled):not(.disabled):active{ background: var(--bg); border-color: #D9D2C9; color: var(--ink); }

.btn-success{ background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-success:hover,
.btn-success:focus,
.btn-success:not(:disabled):not(.disabled):active{ background: #000; border-color: #000; color:#fff; }

.btn-danger{ background: var(--bad); border-color: var(--bad); }
.btn-danger:hover{ background: #8E1D17; border-color: #8E1D17; }
.btn-info{ background: var(--ink-3); border-color: var(--ink-3); color:#fff; }
.btn-warning{ background: var(--brand-lt2); border-color: var(--brand-lt2); color: var(--ink); }
.btn-link{ color: var(--brand-dk); font-weight: 500; }
.btn-sm{ padding: 6px 12px; font-size: 12.5px; }
.btn-lg{ padding: 12px 24px; font-size: 15px; }

/* ------------------------------------------------------------- forms ----- */
label,
.control-label{ font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 5px; }
.form-control{
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-2);
  padding: 9px 12px;
  height: auto;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.form-control::placeholder{ color: #B5ADA3; }
select.form-control{ height: auto; padding: 9px 12px; }
textarea.form-control{ min-height: 76px; }
.input-group-text{
  background: var(--bg);
  border-color: var(--line);
  color: var(--muted);
  font-size: 13px;
  border-radius: var(--radius-sm);
}
.form-group{ margin-bottom: 17px; }
.error, .text-danger{ color: var(--bad); font-size: 13px; }
.error p:empty{ display:none; }

/* select2 to match the native controls */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple{
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  min-height: 40px;
}
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single{
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.select2-container--default .select2-selection--multiple .select2-selection__choice{
  background: var(--brand-lt) !important;
  border: 1px solid var(--brand-lt2) !important;
  color: var(--brand-dkr) !important;
  border-radius: 13px !important;
  padding: 2px 9px !important;
  font-size: 12.5px;
}
.select2-container--default .select2-results__option--highlighted[aria-selected]{ background: var(--brand) !important; }
.select2-dropdown{ border-color: var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }

/* ------------------------------------------------------------ tables ----- */
.table{ color: var(--ink-2); margin-bottom: 0; }
.table thead th{
  background: var(--bg);
  border-bottom: 1px solid var(--line) !important;
  border-top: 0;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .045em;
  padding: 12px 14px;
  white-space: nowrap;
}
.table td{ border-top: 1px solid var(--line-2); padding: 12px 14px; vertical-align: middle; }
.table-hover tbody tr:hover{ background: var(--brand-lt); }
.table-bordered,
.table-bordered td,
.table-bordered th{ border-color: var(--line-2); }
.table-responsive{ border-radius: var(--radius-sm); }

/* DataTables chrome */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input{
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  outline: none;
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus{ border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.dataTables_wrapper .dataTables_info{ color: var(--muted); font-size: 13px; padding-top: 16px; }
.dataTables_wrapper .dataTables_paginate{ padding-top: 12px; }
.dataTables_wrapper .dataTables_paginate .paginate_button,
.pagination .page-link{
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--line) !important;
  color: var(--ink-2) !important;
  margin: 0 2px;
  font-size: 13px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.pagination .page-link:hover{ background: var(--brand-lt) !important; border-color: var(--brand-lt2) !important; color: var(--brand-dkr) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.pagination .page-item.active .page-link{
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled{ opacity: .45; }
.dataTables_processing{
  background: var(--ink) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 10px 20px !important;
  width: auto !important;
  left: 50% !important;
  margin-left: -80px !important;
  font-size: 13px;
}
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc{ cursor: pointer; }

/* ------------------------------------------------------------ alerts ----- */
.alert{
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  padding: 13px 16px;
}
.alert-success{ background: var(--ok-bg); border-color: #BFE5CB; color: var(--ok); }
.alert-danger{ background: var(--bad-bg); border-color: #F5C9C5; color: var(--bad); }
.alert-info{ background: var(--brand-lt); border-color: var(--brand-lt2); color: var(--brand-dkr); }
.alert-warning{ background: var(--warn-bg); border-color: #F0DCB4; color: var(--warn); }
.alert p{ margin: 0; }

/* ------------------------------------------------------------ badges ----- */
.badge{ border-radius: 11px; font-weight: 600; font-size: 11px; padding: 4px 9px; }
.badge-primary{ background: var(--brand); }
.badge-secondary{ background: var(--line); color: var(--ink-2); }
.badge-success{ background: var(--ok-bg); color: var(--ok); }
.badge-dark{ background: var(--ink); }

/* --------------------------------------------------- KPI widget cards ---- */
/* .widget-small is the template's stat card, used on the dashboard. */
.widget-small{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.widget-small .icon{ background: var(--brand); color: #fff; }
.widget-small.primary .icon{ background: var(--brand); }
.widget-small .info h4{ color: var(--muted); }

/* -------------------------------------------------------- modal / misc --- */
.modal-content{ border: 0; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.modal-header{ border-bottom: 1px solid var(--line-2); padding: 16px 20px; }
.modal-title{ font-size: 16px; font-weight: 700; }
.modal-body{ padding: 20px; }
.modal-footer{ border-top: 1px solid var(--line-2); padding: 14px 20px; }
.close{ color: var(--muted); text-shadow: none; opacity: .7; }
.close:hover{ color: var(--ink); opacity: 1; }

.card{ border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
hr{ border-color: var(--line-2); }
.text-muted{ color: var(--muted) !important; }

/* the template's page loader */
.loader{ border-top-color: var(--brand) !important; }
.pace .pace-progress{ background: var(--brand); }

/* --------------------------------------------------------- login page ----
   login.php carries its own markup (.material-half-bg / .login-content /
   .login-box), not the app shell, so none of the rules above reach it. */
.material-half-bg{
  position: fixed; inset: 0; z-index: 0;
  background: var(--ink);
}
.material-half-bg .cover{
  position: absolute; inset: 0; width: 100%; height: 100%;
  background:
    radial-gradient(900px 520px at 18% 8%,  rgba(244,124,32,.42), transparent 62%),
    radial-gradient(700px 460px at 88% 92%, rgba(244,124,32,.20), transparent 60%);
}

.login-content{
  position: relative; z-index: 1;
  min-height: 100vh; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 16px; margin: 0; text-align: center;
}
.login-content .logo{ margin: 0 0 24px; }
.login-content .logo h1{
  margin: 0; color: #fff; font-size: 32px; font-weight: 800; letter-spacing: -.02em;
}
.login-content .logo h1:after{
  content: ''; display: block; width: 46px; height: 4px; border-radius: 3px;
  background: var(--brand); margin: 12px auto 0;
}
.login-content .logo p{
  margin: 12px 0 0; color: rgba(255,255,255,.62);
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
}

.login-box{
  width: 100%; max-width: 400px;
  background: #fff; border-radius: 14px; padding: 30px 30px 26px;
  box-shadow: 0 24px 60px rgba(0,0,0,.42);
  text-align: left;
}
.login-head{
  margin: 0 0 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2);
  font-size: 14px; font-weight: 700; letter-spacing: .06em; color: var(--ink);
}
.login-head i{ color: var(--brand); margin-right: 6px; }

.login-form .control-label{
  font-size: 11.5px; font-weight: 700; letter-spacing: .07em;
  color: var(--ink-3); margin-bottom: 6px;
}
.login-form .form-control{ height: 44px; }
.login-form .utility{ font-size: 13px; color: var(--ink-3); }
.login-form .btn-primary{
  width: 100%; padding: 12px; font-size: 13.5px; font-weight: 700; letter-spacing: .06em;
}
.login-form .error{ color: var(--bad); font-size: 13px; }
.login-form .error:empty,
.login-form .text-success:empty{ display: none; }

/* --------------------------------------------------------- responsive --- */
@media (max-width: 768px){
  .app-title{ margin: -16px -15px 18px; padding: 16px; }
  .app-title h1{ font-size: 19px; }
  .app-header__logo{ width: auto; padding: 0 16px; }
  .tile{ padding: 16px; }
}
