@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Shrikhand&display=swap');

/* =========================================================
   SMILES TO MILES CRM — MASTER BRAND THEME
   Replace the existing /public_html/crm/crm.css with this file.
   ========================================================= */

:root{
  --brand-orange:#F48502;
  --brand-orange-dark:#C86D02;
  --brand-orange-light:#FFF3E5;
  --brand-navy:#33313B;
  --brand-navy-2:#171B23;
  --brand-navy-light:#343B46;
  --ink:#33313B;
  --muted:#6F7885;
  --cream:#F8F7F4;
  --white:#FFFFFF;
  --line:#E8E4DE;
  --success:#188B4A;
  --danger:#C62828;
  --shadow:0 18px 55px rgba(51,49,59,.10);
  --shadow-hover:0 24px 65px rgba(51,49,59,.15);
}

/* ---------- GLOBAL ---------- */

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:"Poppins",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  background:linear-gradient(135deg,#F8F7F4 0%,#FFFFFF 55%,#FFF8F0 100%);
  color:var(--ink);
  font-size:15px;
  line-height:1.6;
}

a{
  color:inherit;
  text-decoration:none;
  transition:color .2s ease,background .2s ease,border-color .2s ease;
}

a:hover{
  color:var(--brand-orange);
}

button,
input,
select,
textarea{
  font-family:inherit;
}

button{
  cursor:pointer;
}

/* ---------- BRAND TYPOGRAPHY ---------- */

/*
  Use these classes for every visible "Smiles To Miles"
  brand heading/logo.
*/
.brand b,
.brand-name,
.brand-title,
.logo-text,
.title,
.login-box h2,
.login-visual h1,
.section h2{
  font-family:"Shrikhand",cursive !important;
  font-weight:400;
}

/* Main page titles */
.title{
  font-size:34px;
  line-height:1.15;
  margin:5px 0;
  color:var(--brand-navy);
}

/* ---------- MAIN CRM SHELL ---------- */

.crm-shell{
  min-height:100vh;
  display:flex;
}

/* ---------- SIDEBAR ---------- */

.crm-side{
  width:255px;
  background:linear-gradient(180deg,var(--brand-navy) 0%,var(--brand-navy-2) 100%);
  color:#fff;
  padding:28px 18px;
  position:fixed;
  inset:0 auto 0 0;
  z-index:100;
  overflow-y:auto;
  box-shadow:8px 0 35px rgba(23,27,35,.12);
}

.brand{
  padding:8px 12px 28px;
  border-bottom:1px solid rgba(255,255,255,.10);
  margin-bottom:20px;
}

.brand b{
  display:block;
  color:#fff;
  font-size:25px;
  line-height:1.2;
  letter-spacing:.2px;
}

.brand small{
  display:block;
  color:#D9D9D9;
  margin-top:7px;
  font-size:12px;
  letter-spacing:.02em;
}

/* Navigation */

.nav a{
  display:flex;
  gap:12px;
  align-items:center;
  text-decoration:none;
  padding:12px 14px;
  border-radius:12px;
  color:#E1E1E1;
  margin:4px 0;
  border-left:3px solid transparent;
  transition:all .22s ease;
}

.nav a:hover,
.nav a.active{
  background:rgba(244,133,2,.16);
  color:#fff;
  border-left-color:var(--brand-orange);
  padding-left:11px;
}

.nav a:hover{
  transform:translateX(2px);
}

.nav a svg,
.nav a i{
  color:currentColor;
}

/* ---------- MAIN CONTENT ---------- */

.crm-main{
  margin-left:255px;
  width:calc(100% - 255px);
  min-width:0;
  padding:30px;
}

.top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:28px;
}

.eyebrow{
  text-transform:uppercase;
  letter-spacing:.14em;
  color:var(--brand-orange);
  font-size:11px;
  font-weight:800;
}

.user-chip{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:999px;
  padding:10px 16px;
  box-shadow:0 6px 25px rgba(0,0,0,.04);
  font-weight:500;
  white-space:nowrap;
}

.user-chip:hover{
  border-color:rgba(244,133,2,.35);
  color:var(--brand-orange);
}

/* ---------- DASHBOARD GRID ---------- */

.grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}

.card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:20px;
  padding:22px;
  box-shadow:var(--shadow);
  transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease;
}

.card:hover{
  transform:translateY(-3px);
  box-shadow:var(--shadow-hover);
  border-color:rgba(244,133,2,.28);
}

.stat{
  font-size:30px;
  font-weight:800;
  line-height:1.1;
  margin:6px 0;
  color:var(--brand-navy);
}

.muted{
  color:var(--muted);
}

.section{
  margin-top:22px;
}

.section h2{
  font-size:22px;
  line-height:1.2;
  color:var(--brand-navy);
}

/* ---------- TABLES ---------- */

.table{
  width:100%;
  border-collapse:collapse;
  background:var(--white);
}

.table th,
.table td{
  text-align:left;
  padding:13px 10px;
  border-bottom:1px solid var(--line);
  font-size:14px;
}

.table th{
  color:var(--brand-navy);
  font-weight:700;
  background:#FCFBF9;
}

.table tr:hover td{
  background:#FFFBF6;
}

/* ---------- BADGES ---------- */

.badge{
  display:inline-block;
  padding:5px 10px;
  border-radius:999px;
  background:var(--brand-orange-light);
  color:#9D5A20;
  font-size:12px;
  font-weight:800;
}

.badge.success{
  background:#E9F7EF;
  color:var(--success);
}

.badge.danger{
  background:#FDECEC;
  color:var(--danger);
}

/* ---------- BUTTONS ---------- */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:0;
  border-radius:12px;
  padding:12px 17px;
  font-weight:800;
  cursor:pointer;
  text-decoration:none;
  transition:all .25s ease;
}

.btn-primary{
  background:linear-gradient(135deg,#F48502 0%,#FD7E14 100%);
  color:#fff;
  width:100%;
  box-shadow:0 8px 20px rgba(244,133,2,.20);
}

.btn-primary:hover{
  background:linear-gradient(135deg,#FD7E14 0%,#F48502 100%);
  color:#fff;
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(244,133,2,.28);
}

.btn-secondary{
  background:#fff;
  color:var(--brand-navy);
  border:1px solid var(--line);
}

.btn-secondary:hover{
  border-color:var(--brand-orange);
  color:var(--brand-orange);
}

.btn-danger{
  background:#C62828;
  color:#fff;
}

.btn-danger:hover{
  background:#A91F1F;
  color:#fff;
}

/* ---------- FORMS ---------- */

.field{
  margin:18px 0;
}

.field label{
  display:block;
  font-size:13px;
  font-weight:700;
  margin-bottom:7px;
  color:var(--brand-navy);
}

.field input,
.field select,
.field textarea{
  width:100%;
  padding:13px 14px;
  border:1px solid #DDD;
  border-radius:12px;
  font-size:15px;
  outline:none;
  background:#fff;
  color:var(--ink);
  transition:border-color .2s ease,box-shadow .2s ease;
}

.field textarea{
  min-height:120px;
  resize:vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus{
  border-color:var(--brand-orange);
  box-shadow:0 0 0 4px rgba(244,133,2,.12);
}

/* ---------- ALERTS ---------- */

.alert{
  padding:12px 14px;
  border-radius:12px;
  background:#FFF3E8;
  color:#9C4A00;
  border:1px solid #FFD2A3;
}

.alert.success{
  background:#EAF7EF;
  color:#187A43;
  border-color:#BFE6CF;
}

.alert.error{
  background:#FDECEC;
  color:#B42318;
  border-color:#F4B8B8;
}

/* ---------- LOGIN PAGE ---------- */

.login-page{
  min-height:100vh;
  display:grid;
  grid-template-columns:1.1fr .9fr;
}

.login-visual{
  background:
    linear-gradient(135deg,rgba(23,27,35,.95),rgba(52,59,70,.90)),
    linear-gradient(135deg,#171B23,#343B46);
  color:#fff;
  padding:8vw;
  display:flex;
  align-items:flex-end;
}

.login-visual h1{
  font-size:58px;
  max-width:620px;
  line-height:1.02;
  margin:0;
  color:#fff;
}

.login-visual p{
  max-width:560px;
  color:#D8DCE2;
  font-size:17px;
  line-height:1.7;
}

.login-panel{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:40px;
  background:var(--cream);
}

.login-box{
  width:min(460px,100%);
  background:#fff;
  border:1px solid var(--line);
  border-radius:28px;
  padding:38px;
  box-shadow:0 30px 80px rgba(25,32,43,.12);
}

.login-box h2{
  font-size:30px;
  margin:0 0 7px;
  color:var(--brand-navy);
}

/* ---------- FOOTER ---------- */

.footer-note{
  margin-top:28px;
  color:#777;
  font-size:12px;
}

/* ---------- BRAND ACCENTS ---------- */

.eyebrow,
.muted a,
a:hover{
  color:var(--brand-orange);
}

hr{
  border:0;
  border-top:1px solid var(--line);
}

::selection{
  background:rgba(244,133,2,.22);
  color:var(--brand-navy);
}

/* ---------- RESPONSIVE ---------- */

@media(max-width:1000px){

  .crm-side{
    position:static;
    width:100%;
    height:auto;
  }

  .crm-shell{
    display:block;
  }

  .crm-main{
    margin:0;
    width:100%;
    padding:20px;
  }

  .grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .login-page{
    grid-template-columns:1fr;
  }

  .login-visual{
    min-height:300px;
    padding:45px;
  }

  .login-visual h1{
    font-size:42px;
  }
}

@media(max-width:600px){

  .grid{
    grid-template-columns:1fr;
  }

  .crm-side{
    padding:18px;
  }

  .crm-main{
    padding:16px;
  }

  .top{
    align-items:flex-start;
    flex-direction:column;
  }

  .title{
    font-size:28px;
  }

  .login-panel{
    padding:20px;
  }

  .login-box{
    padding:26px 22px;
    border-radius:22px;
  }

  .login-visual{
    min-height:260px;
    padding:30px 25px;
  }

  .login-visual h1{
    font-size:36px;
  }

  .table{
    display:block;
    overflow-x:auto;
    white-space:nowrap;
  }
}


/* =========================================================
   SMILES TO MILES CRM — PREMIUM NORMAL TYPOGRAPHY
   Shrikhand remains for brand/display identity only.
   ========================================================= */

html, body { font-size: 15px; }
body { line-height: 1.5; }

.crm-main .title {
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -.2px !important;
  margin: 3px 0 !important;
}

.crm-main .section h2 {
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
  margin: 0 0 10px !important;
}

.crm-side .brand b {
  font-size: 21px !important;
  line-height: 1.15 !important;
}

.crm-side .brand small { font-size: 11px !important; }

.crm-side .nav a {
  font-size: 14px !important;
  font-weight: 500 !important;
}

.crm-main .stat {
  font-size: 25px !important;
  font-weight: 700 !important;
}

.crm-main .card { padding: 19px !important; }

.crm-main .muted { font-size: 13px !important; }

.crm-main .table th,
.crm-main .table td {
  font-size: 13px !important;
  line-height: 1.45 !important;
  padding: 11px 10px !important;
}

.crm-main .table th { font-weight: 650 !important; }

.crm-main .badge {
  font-size: 11px !important;
  font-weight: 650 !important;
  padding: 4px 9px !important;
}

.crm-main .user-chip {
  font-size: 13px !important;
  padding: 8px 13px !important;
}

.crm-main .stm-btn {
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 9px 14px !important;
  border-radius: 10px !important;
}

.crm-main .stm-btn.small {
  font-size: 12px !important;
  padding: 6px 10px !important;
}

.crm-main .stm-panel {
  border-radius: 16px !important;
  padding: 19px !important;
}

.crm-main label {
  font-size: 12px !important;
  font-weight: 600 !important;
}

.crm-main input,
.crm-main select,
.crm-main textarea {
  font-size: 13px !important;
}

@media (max-width: 768px) {
  .crm-main { padding: 20px !important; }

  .crm-main .title { font-size: 23px !important; }

  .crm-main .section h2 { font-size: 17px !important; }

  .crm-main .stat { font-size: 23px !important; }
}

