/* ISP360 Payments — v1.0 Market Launch Polish */

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:104px;
  margin-bottom:20px;
  padding:23px 25px;
  border:1px solid #dfe7ef;
  border-radius:16px;
  background:#fff;
  box-shadow:0 4px 16px rgba(24,55,77,.04);
}

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

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

.btn{
  min-height:41px;
  padding:10px 16px;
  border:1px solid #153b50;
  border-radius:9px;
  background:#153b50;
  color:#fff;
  font-size:12px;
  font-weight:700;
  transition:.15s ease;
}

.btn:hover{
  background:#087c75;
  border-color:#087c75;
}

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

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

.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:105px;
  height:105px;
  right:-28px;
  bottom:-45px;
  border:21px solid rgba(255,255,255,.06);
  border-radius:50%;
}

.card-title{
  position:relative;
  z-index:1;
  margin-bottom:12px;
  color:#eef6ff;
  font-size:10px;
  font-weight:700;
  letter-spacing:1px;
}

.card-value{
  position:relative;
  z-index:1;
  color:#fff;
  font-size:29px;
  font-weight:750;
  letter-spacing:-.8px;
  font-variant-numeric:tabular-nums;
}

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

.table-header{
  position:sticky;
  left:0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  margin:0;
  padding:18px 20px;
  border-bottom:1px solid #edf1f5;
  background:#fff;
}

.table-header h2{
  margin:0;
  color:#19374e;
  font-size:16px;
  font-weight:700;
}

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

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

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

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

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

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

tbody tr:hover{
  background:#f8fbfd;
}

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

.receipt-btn{
  min-height:33px;
  padding:7px 11px;
  border:1px solid #153b50;
  border-radius:7px;
  background:#153b50;
  color:#fff;
  font-size:10px;
  font-weight:700;
  cursor:pointer;
}

.receipt-btn:hover{
  background:#087c75;
  border-color:#087c75;
}

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

/* Keyboard accessibility */
button:focus-visible,
input:focus-visible{
  outline:3px solid #5ebdb5;
  outline-offset:3px;
}

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

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

  .header{
    align-items:flex-start;
    flex-direction:column;
    gap:16px;
    min-height:0;
    padding:20px;
  }

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

  .btn{
    width:100%;
  }

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

  .card{
    min-height:100px;
    padding:17px;
  }

  .card-value{
    font-size:26px;
  }

  .table-header{
    align-items:stretch;
    flex-direction:column;
    padding:16px;
  }

  .search{
    width:100%;
  }

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