/* ISP360 Audit Trail — v1.0 Market Launch */

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;
}

/* Header */
.header{
  min-height:100px;
  margin-bottom:18px;
  padding:21px 23px;
  border:1px solid #dfe7ef;
  border-radius:15px;
  background:#fff;
  box-shadow:0 4px 15px rgba(24,55,77,.035);
}

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

.sub{
  margin-top:7px;
  color:#71869a;
  font-size:13px;
}

.actions{
  gap:8px;
}

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

button.green{
  background:#087c75;
  border-color:#087c75;
}

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

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

.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,#08766c,#159c8b);
}

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

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

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

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

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

/* Filters */
.filters{
  display:grid;
  grid-template-columns:minmax(250px,2fr) 1fr 1fr 125px;
  gap:10px;
  margin-bottom:18px;
  padding:16px;
  border:1px solid #dfe7ef;
  border-radius:14px;
  background:#fff;
  box-shadow:0 4px 15px rgba(24,55,77,.035);
}

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

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

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

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;
  vertical-align:top;
}

tbody tr:hover{
  background:#f8fbfd;
}

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

.module{
  color:#1d5f96;
  font-weight:700;
}

.details{
  min-width:220px;
  max-width:360px;
  white-space:normal;
  word-break:break-word;
}

.meta{
  margin-top:5px;
  color:#71869a;
  font-size:10px;
}

.empty{
  padding:35px !important;
  color:#7b8fa2;
  text-align:center;
}

.error{
  border:1px solid #f4c8c8;
  border-radius:9px;
}

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

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

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

  .header{
    align-items:flex-start;
    flex-direction:column;
    min-height:0;
  }

  .header h1{
    font-size:27px;
  }

  .actions{
    width:100%;
  }

  .actions button{
    flex:1;
  }

  .cards,
  .filters{
    grid-template-columns:1fr;
  }

  .card{
    min-height:96px;
  }

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