/* TINA ENERGY 10.1 — UI Polish & Typography */
:root{
  --te-space-1:8px;
  --te-space-2:16px;
  --te-space-3:24px;
  --te-space-4:32px;
  --te-space-5:48px;
  --te-space-6:64px;
  --te-duration:180ms;
}

body.tina-ui-10{
  font-size:15px!important;
  letter-spacing:.002em;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}

body.tina-ui-10 h1{font-size:clamp(34px,4vw,52px)!important;letter-spacing:-.025em!important}
body.tina-ui-10 h2{font-size:26px!important;letter-spacing:-.018em!important;margin-bottom:18px!important}
body.tina-ui-10 h3{font-size:18px!important;letter-spacing:-.01em!important;margin-bottom:12px!important}
body.tina-ui-10 p{line-height:1.68!important}
body.tina-ui-10 small{line-height:1.45!important}

.card,.premium-card,.admin-priority-card,.quick-card{
  transition:border-color var(--te-duration) ease,box-shadow var(--te-duration) ease,transform var(--te-duration) ease!important;
}
.card:hover,.premium-card:hover{
  border-color:#dcc5af!important;
  box-shadow:0 12px 30px rgba(70,47,33,.10)!important;
}

.te-page-hero{
  min-height:250px!important;
  margin-bottom:var(--te-space-3)!important;
}
.te-page-hero__badge{
  backdrop-filter:blur(8px);
  letter-spacing:.14em!important;
}
.te-page-hero p{max-width:680px!important;line-height:1.55!important}

.te-stat-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}
.te-stat-card{
  display:flex;
  align-items:center;
  gap:14px;
  min-height:116px;
  padding:19px;
  background:var(--te-panel);
  border:1px solid var(--te-line);
  border-radius:17px;
  box-shadow:0 7px 22px rgba(70,47,33,.07);
  transition:transform var(--te-duration) ease,border-color var(--te-duration) ease,box-shadow var(--te-duration) ease;
}
.te-stat-card:hover{
  transform:translateY(-2px);
  border-color:#d6bda5;
  box-shadow:0 12px 26px rgba(70,47,33,.11);
}
.te-stat-icon{
  width:46px;
  height:46px;
  flex:0 0 46px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:#f3e8dc;
  font-size:21px;
}
.te-stat-copy{display:flex;flex-direction:column;min-width:0}
.te-stat-copy small{
  color:var(--te-muted)!important;
  font-weight:800;
  font-size:11px;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.te-stat-copy strong{
  color:var(--te-text)!important;
  font-family:Georgia,"Times New Roman",serif;
  font-size:31px;
  line-height:1.15;
  margin:3px 0;
}
.te-stat-copy em{
  color:#8b7c71;
  font-style:normal;
  font-size:11px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.te-dashboard-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin-bottom:18px;
}
.te-dashboard-card{padding:24px!important}
.te-section-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
.te-section-heading h2{margin:2px 0 0!important}
.te-eyebrow{
  display:block;
  color:#a27655;
  font-size:10px;
  font-weight:900;
  letter-spacing:.15em;
  text-transform:uppercase;
}
.te-soft-badge,.te-date-chip{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:7px 11px;
  background:#f4ebe1;
  color:var(--te-brown);
  border:1px solid #e5d3c2;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
.te-list-block+.te-list-block{margin-top:24px;padding-top:21px;border-top:1px solid #eee1d5}
.te-list-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:56px;
  padding:10px 0;
  border-bottom:1px solid #f0e5da;
}
.te-list-row:last-child{border-bottom:0}
.te-list-row>div{display:flex;flex-direction:column;min-width:0}
.te-list-row strong{font-size:14px;color:var(--te-text)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.te-list-row small{font-size:12px;color:var(--te-muted)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.te-amount{font-weight:900;color:var(--te-text)}
.te-inline-link{color:var(--te-brown)!important;font-size:12px;font-weight:900;white-space:nowrap}
.te-inline-link:hover{text-decoration:underline}

.te-action-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.te-action-grid a{
  display:grid;
  grid-template-columns:38px 1fr;
  grid-template-rows:auto auto;
  column-gap:11px;
  align-items:center;
  padding:14px;
  border:1px solid #eadacb;
  border-radius:13px;
  background:#fffaf4;
  transition:background var(--te-duration) ease,border-color var(--te-duration) ease,transform var(--te-duration) ease;
}
.te-action-grid a:hover{background:#f7eee4;border-color:#d5bba3;transform:translateY(-1px)}
.te-action-grid a>span{grid-row:1/3;width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:#f0e2d4;font-size:18px}
.te-action-grid strong{font-size:13px;color:var(--te-text)!important}
.te-action-grid small{font-size:11px;color:var(--te-muted)!important}

.te-empty-compact{
  display:flex;
  align-items:center;
  gap:13px;
  min-height:84px;
  padding:16px;
  border:1px dashed #dfcbb8;
  border-radius:13px;
  background:#fffaf4;
}
.te-empty-compact>span{
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#efe3d6;
  color:var(--te-brown);
  font-weight:900;
}
.te-empty-compact>div{display:flex;flex-direction:column;gap:2px}
.te-empty-compact strong{font-size:14px;color:var(--te-text)!important}
.te-empty-compact small{font-size:12px;color:var(--te-muted)!important}

/* Unified form rhythm */
.form-grid{row-gap:18px!important}
label{letter-spacing:.01em}
input:not([type=checkbox]):not([type=radio]),textarea,select{
  transition:border-color var(--te-duration) ease,box-shadow var(--te-duration) ease,background var(--te-duration) ease!important;
}
button,.btn,input[type=submit]{
  transition:background var(--te-duration) ease,border-color var(--te-duration) ease,transform var(--te-duration) ease,box-shadow var(--te-duration) ease!important;
}
button:hover,.btn:hover,input[type=submit]:hover{transform:translateY(-1px)!important;box-shadow:0 5px 12px rgba(70,47,33,.12)!important}

/* Refined tables */
table tbody tr{transition:background var(--te-duration) ease}
table tbody tr:hover{background:#fffaf4!important}
th{letter-spacing:.045em;text-transform:uppercase}
.badge{letter-spacing:.035em;text-transform:uppercase}

/* Better flash messages */
.flash{
  border-radius:13px!important;
  padding:13px 16px!important;
  margin-bottom:16px!important;
  border:1px solid #e5d3c2!important;
  background:#fff9f2!important;
  color:var(--te-text)!important;
  box-shadow:0 5px 14px rgba(70,47,33,.05)!important;
}
.flash.success{background:#edf7ee!important;border-color:#cde3cf!important;color:#396b42!important}
.flash.error,.flash.danger{background:#fbecea!important;border-color:#efcbc6!important;color:#9f3e36!important}

@media(max-width:1180px){
  .te-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:900px){
  .te-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .te-dashboard-grid{grid-template-columns:1fr}
}
@media(max-width:560px){
  .te-stat-grid{grid-template-columns:1fr}
  .te-stat-card{min-height:96px}
  .te-action-grid{grid-template-columns:1fr}
  .te-section-heading{align-items:flex-start}
  .te-dashboard-card{padding:18px!important}
}
