/* ISP360 Complaints / Helpdesk — v1.0 */

body{
  background:#f3f6fa;
  color:#183047;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  font-size:14px;
}

.main{
  margin-left:var(--sidebar-width) !important;
  width:auto !important;
  max-width:none !important;
  padding:24px !important;
}

.main > h1{
  margin:0;
  color:#18374e;
  font-size:30px;
  line-height:1.1;
  letter-spacing:-.7px;
}

.main > .sub{
  margin:7px 0 21px;
  color:#71869a;
  font-size:13px;
}

/* KPI cards */
.cards{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
  margin-bottom:20px;
}

.card{
  position:relative;
  overflow:hidden;
  min-height:105px;
  padding:18px 19px;
  border:0;
  border-radius:14px;
  color:#fff;
  background:linear-gradient(115deg,#2456a5,#3976cb);
  box-shadow:0 7px 19px rgba(37,78,153,.11);
}

.card:nth-child(2){
  background:linear-gradient(115deg,#b14848,#d56565);
}

.card:nth-child(3){
  background:linear-gradient(115deg,#a8661d,#d39943);
}

.card:nth-child(4){
  background:linear-gradient(115deg,#08766c,#159c8b);
}

.card:nth-child(5){
  background:linear-gradient(115deg,#6150aa,#8970c7);
}

.card:after{
  content:"";
  position:absolute;
  width:95px;
  height:95px;
  right:-27px;
  bottom:-42px;
  border:19px solid rgba(255,255,255,.06);
  border-radius:50%;
}

.label{
  position:relative;
  z-index:1;
  color:#eef6ff;
  font-size:9px;
  font-weight:700;
  letter-spacing:.9px;
}

.value{
  position:relative;
  z-index:1;
  margin-top:12px;
  color:#fff;
  font-size:27px;
  font-weight:750;
  font-variant-numeric:tabular-nums;
}

/* Ticket panel */
.panel{
  padding:0;
  border:1px solid #dfe7ef;
  border-radius:15px;
  background:#fff;
  box-shadow:0 4px 15px rgba(24,55,77,.035);
  overflow:hidden;
}

.top{
  margin:0;
  padding:18px 20px;
  border-bottom:1px solid #edf1f5;
  background:#fff;
}

.top > div{
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
}

.top h2{
  margin:0;
  color:#19374e;
  font-size:16px;
}

.top h2:before{
  content:"";
  display:inline-block;
  width:4px;
  height:17px;
  margin-right:10px;
  border-radius:3px;
  background:#258eab;
  vertical-align:-3px;
}

.search{
  width:320px;
  min-height:40px;
  padding:10px 12px;
  border:1px solid #d5e0e9;
  border-radius:8px;
  font:inherit;
  font-size:12px;
  outline:none;
}

.search:focus{
  border-color:#45a99f;
  box-shadow:0 0 0 3px rgba(69,169,159,.12);
}

button{
  min-height:36px;
  padding:8px 11px;
  border:1px solid #153b50;
  border-radius:7px;
  background:#153b50;
  color:#fff;
  font-size:10px;
  font-weight:700;
}

button:hover{
  filter:brightness(.94);
}

table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
}

th{
  padding:13px 14px;
  border-bottom:1px solid #e8eef4;
  background:#f7f9fc;
  color:#587188;
  font-size:10px;
  font-weight:700;
  letter-spacing:.35px;
  text-transform:uppercase;
  white-space:nowrap;
}

td{
  padding:13px 14px;
  border-bottom:1px solid #edf2f6;
  color:#294258;
  font-size:12px;
  white-space:nowrap;
}

tbody tr:hover{
  background:#f8fbfd;
}

.badge{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:5px 9px;
  border-radius:20px;
  font-size:9px;
  font-weight:700;
}

/* Modals */
.modal{
  background:rgba(15,35,55,.48);
  backdrop-filter:blur(2px);
}

.box{
  border-radius:16px;
  box-shadow:0 24px 60px rgba(15,35,55,.22);
}

.box h2{
  color:#18374e;
}

.field label{
  color:#587188;
  font-size:11px;
}

input,
select,
textarea{
  min-height:40px;
  padding:10px 12px;
  border:1px solid #d5e0e9;
  border-radius:8px;
  background:#fff;
  color:#213d54;
  font:inherit;
  font-size:12px;
  outline:none;
}

textarea{
  min-height:85px;
}

input:focus,
select:focus,
textarea:focus{
  border-color:#45a99f;
  box-shadow:0 0 0 3px rgba(69,169,159,.12);
}

.history{
  padding:12px 0;
  border-bottom:1px solid #edf2f6;
}

.history small{
  color:#71869a;
}

/* Responsive */
@media(max-width:1200px){
  .cards{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:900px){
  .cards{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:700px){
  .main{
    margin-left:0 !important;
    width:100% !important;
    padding:15px !important;
  }

  .main > h1{
    font-size:27px;
  }

  .cards{
    grid-template-columns:1fr;
    gap:10px;
  }

  .card{
    min-height:96px;
  }

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

  .top > div{
    align-items:stretch;
    flex-direction:column;
  }

  .search{
    width:100%;
  }

  .top > button{
    width:100%;
  }

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

  .full{
    grid-column:auto;
  }

  th,td{
    padding:12px 13px;
  }
}
