/* =========================================================
   ASTRO CONSULTANCY - KUNDALI PROFESSIONAL CSS
   Full replacement: assets/css/kundali-pro.css
   ========================================================= */

:root{
  --ak-red:#a71920;
  --ak-red-dark:#821116;
  --ak-gold:#c77812;
  --ak-border:#ead4bb;
  --ak-cream:#fffaf3;
  --ak-cream2:#fff5e6;
  --ak-text:#101c35;
  --ak-muted:#755f52;
  --ak-white:#fff;
  --ak-shadow:0 10px 28px rgba(73,42,20,.06);
}

.ak-page,.ak-page *{box-sizing:border-box}
.ak-page{
  width:100%;
  max-width:1180px;
  margin:0 auto;
  padding:0 0 36px;
  color:var(--ak-text);
}
.ak-card{
  background:#fff;
  border:1px solid var(--ak-border);
  border-radius:16px;
  box-shadow:var(--ak-shadow);
  overflow:hidden;
}

/* ---------- BIRTH FORM ---------- */
.ak-form-card{
  padding:26px;
  margin-bottom:20px;
  background:linear-gradient(135deg,#fff 0%,#fffaf4 100%);
}
.ak-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
}
.ak-form-head{margin-bottom:22px}
.ak-kicker,.ak-chart-label{
  display:block;
  color:#d45f10;
  font-size:10px;
  font-weight:800;
  letter-spacing:1.35px;
  text-transform:uppercase;
}
.ak-section-head h1{
  margin:8px 0 8px;
  font-size:34px;
  line-height:1.15;
  color:var(--ak-text);
}
.ak-section-head p{
  margin:0;
  color:var(--ak-muted);
  font-size:14px;
}
.ak-om{
  color:var(--ak-gold);
  font-size:32px;
  line-height:1;
}

.ak-birth-form{
  display:grid;
  grid-template-columns:1.15fr 1.05fr 1.05fr 1.45fr 1.2fr 1.15fr 1fr;
  gap:12px;
  align-items:end;
}
.ak-field{position:relative;min-width:0}
.ak-field label{
  display:block;
  margin:0 0 7px;
  color:#392b24;
  font-size:11px;
  line-height:1.2;
  font-weight:750;
}
.ak-field label span{color:var(--ak-red)}
.ak-field input,.ak-field select{
  display:block;
  width:100% !important;
  height:46px !important;
  min-height:46px;
  margin:0 !important;
  padding:0 11px !important;
  border:1px solid #ddc8b2 !important;
  border-radius:9px !important;
  background:#fff !important;
  color:#1b2740 !important;
  font-size:12px !important;
  line-height:46px;
  outline:0;
  box-shadow:none !important;
}
.ak-field input:focus,.ak-field select:focus{
  border-color:#c78442 !important;
  box-shadow:0 0 0 3px rgba(199,122,16,.10) !important;
}
.ak-field input::placeholder{color:#9b9ca5}
.ak-submit-wrap{
  display:flex;
  align-items:flex-end;
}
.ak-primary-btn,.ak-secondary-btn,.ak-mini-btn{
  font-family:inherit;
  font-weight:750;
  text-decoration:none !important;
  border-radius:9px;
  cursor:pointer;
  transition:.18s ease;
}
.ak-primary-btn{
  min-height:46px;
  padding:10px 17px;
  border:1px solid var(--ak-red);
  background:var(--ak-red);
  color:#fff !important;
}
.ak-primary-btn:hover{
  background:var(--ak-red-dark);
  border-color:var(--ak-red-dark);
}
.ak-secondary-btn{
  min-height:46px;
  padding:10px 17px;
  border:1px solid #ddc3a7;
  background:#fff;
  color:var(--ak-red) !important;
}
.ak-mini-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border:1px solid #ddc3a7;
  background:#fff;
  color:var(--ak-red) !important;
  font-size:11px;
}

.ak-location-preview{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:10px 13px;
  border:1px dashed #e2bd8a;
  border-radius:9px;
  background:#fff9ef;
}
.ak-location-preview strong{
  color:var(--ak-red);
  font-size:12px;
}
.ak-location-preview span:not(.ak-location-icon){
  margin-left:8px;
  color:#806c60;
  font-size:11px;
}
.ak-location-icon{color:var(--ak-gold);font-size:18px}

.ak-suggestions{
  display:none;
  position:absolute;
  z-index:99999;
  top:100%;
  left:0;
  right:0;
  max-height:260px;
  overflow:auto;
  margin-top:4px;
  border:1px solid var(--ak-border);
  border-radius:9px;
  background:#fff;
  box-shadow:0 14px 30px rgba(0,0,0,.13);
}
.ak-suggestions.open{display:block}
.ak-suggestion{
  display:block;
  width:100%;
  padding:10px 12px;
  border:0;
  border-bottom:1px solid #f0e5d9;
  background:#fff;
  text-align:left;
  cursor:pointer;
}
.ak-suggestion:hover{background:#fff8ed}
.ak-suggestion strong{display:block;color:#33261f;font-size:12px}
.ak-suggestion span{display:block;margin-top:2px;color:#806c60;font-size:10px}
.ak-no-result{padding:11px 12px;color:#806c60;font-size:11px}
.ak-alert{
  margin:0 0 16px;
  padding:12px 14px;
  border:1px solid #efc4c4;
  border-radius:9px;
  background:#fff4f4;
  color:#9d171d;
}

/* ---------- SUMMARY ---------- */
.ak-summary{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  margin:0 0 20px;
  border:1px solid var(--ak-border);
  border-radius:14px;
  overflow:hidden;
  background:#fffdf9;
}
.ak-summary>div{
  min-height:92px;
  padding:18px 15px;
  border-right:1px solid var(--ak-border);
}
.ak-summary>div:last-child{border-right:0}
.ak-summary small{
  display:block;
  margin-bottom:8px;
  color:#9b6d51;
  font-size:8px;
  letter-spacing:.7px;
  text-transform:uppercase;
}
.ak-summary strong{
  color:#111b32;
  font-size:12px;
  line-height:1.65;
}

/* ---------- D1/D9 + PANCHANG ---------- */
.ak-main-result{
  display:grid;
  grid-template-columns:minmax(0,2.15fr) minmax(285px,.85fr);
  gap:18px;
  align-items:start;
  margin-bottom:18px;
}
.ak-chart-card{padding:0}
.ak-chart-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
}
.ak-chart-panel{
  min-width:0;
  border-right:1px solid var(--ak-border);
}
.ak-chart-panel:last-child{border-right:0}
.ak-chart-title-row{
  min-height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:15px 16px;
  border-bottom:1px solid var(--ak-border);
  background:#fffaf3;
}
.ak-chart-title-row h2{
  margin:5px 0 0;
  color:var(--ak-red);
  font-size:18px;
  line-height:1.2;
}
.ak-fixed-badge{
  padding:6px 9px;
  border-radius:999px;
  background:#fff0d8;
  color:#b76a0d;
  font-size:9px;
  font-weight:800;
}
.ak-chart-select{
  width:205px;
  max-width:52%;
  height:40px;
  padding:0 10px;
  border:1px solid #dcc9b4;
  border-radius:8px;
  background:#fff;
  color:#3e332d;
  font-size:11px;
}
.ak-chart-canvas{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:445px;
  padding:24px 14px;
  overflow:hidden;
}
.ak-chart-canvas svg{
  display:block;
  width:100%;
  max-width:420px;
  height:auto;
  max-height:410px;
}

/* status legend under charts */
.ak-chart-legend{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 14px;
  margin:0;
  padding:10px 14px;
  border-top:1px solid var(--ak-border);
  background:#fff8ed;
  color:#5f4b3f;
  font-size:11px;
  font-weight:650;
}
.ak-chart-legend span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  white-space:nowrap;
}
.ak-chart-legend b{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 3px;
  border-radius:5px;
  background:#fff;
  color:#000 !important;
  font-size:13px;
  line-height:1;
  font-weight:900;
}

/* Panchang */
.ak-panchang-side{box-shadow:none}
.ak-side-head{
  padding:14px 16px;
  border-bottom:1px solid var(--ak-border);
  background:#fff8ed;
}
.ak-side-head h2{
  margin:0;
  color:var(--ak-red);
  font-size:18px;
}
.ak-panchang-cards{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  padding:12px;
}
.ak-panchang-item{
  min-height:64px;
  padding:10px;
  border:1px solid #eadbc9;
  border-radius:9px;
  background:#fffdfa;
}
.ak-panchang-item small{
  display:block;
  margin-bottom:5px;
  color:#9a6849;
  font-size:8px;
  font-weight:800;
  letter-spacing:.5px;
  text-transform:uppercase;
}
.ak-panchang-item strong{
  color:#241b17;
  font-size:11px;
  line-height:1.35;
}

/* ---------- PLANETARY + DASHA ---------- */
.ak-bottom-grid{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(320px,.75fr);
  gap:18px;
  align-items:start;
  margin-bottom:18px;
}
.ak-table-scroll{width:100%;overflow:auto}
.ak-table{
  width:100%;
  border-collapse:collapse;
  margin:0;
  background:#fff;
  font-size:11px;
}
.ak-table th{
  padding:10px 9px;
  border:1px solid #ead9c5;
  background:#fff3d9;
  color:#7b4a0a;
  text-align:left;
  font-weight:750;
  white-space:nowrap;
}
.ak-table td{
  padding:9px;
  border:1px solid #eee0d2;
  color:#332922;
  vertical-align:middle;
}
.ak-table tbody tr:nth-child(even){background:#fcfaf7}
.ak-status-cell{min-width:145px}
.ak-status-chip{
  display:inline-flex;
  align-items:center;
  gap:3px;
  margin:2px 3px 2px 0;
  padding:3px 6px;
  border:1px solid #ead8c2;
  border-radius:999px;
  background:#fffaf2;
  color:#55463d;
  font-size:9px;
  font-weight:700;
  white-space:nowrap;
}
.ak-status-chip b{
  color:#000 !important;
  font-size:11px;
  font-weight:900;
}
.ak-status-chip.exalted{border-color:#dec283;background:#fff8df}
.ak-status-chip.debilitated,.ak-status-chip.combust{
  border-color:#e4c2bd;background:#fff4f2;
}
.ak-status-chip.vargottama{border-color:#d7c9ab;background:#fffbf1}
.ak-status-chip.retro{border-color:#d6c5b8;background:#fbf8f5}

.ak-dasha-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.ak-current-dasha{
  display:grid;
  gap:9px;
  padding:12px;
}
.ak-current-dasha>div{
  padding:10px 11px;
  border:1px solid #eadbc9;
  border-radius:9px;
  background:#fffdfa;
}
.ak-current-dasha small{
  display:block;
  color:#9a6849;
  font-size:8px;
  text-transform:uppercase;
}
.ak-current-dasha strong{
  display:block;
  margin:3px 0;
  color:var(--ak-red);
  font-size:15px;
}
.ak-current-dasha span{color:#746157;font-size:10px}
.ak-dasha-detail{padding:0 12px 12px}

/* ---------- PRINT ACTIONS ---------- */
.ak-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:16px 18px;
}
.ak-actions h2{
  margin:0 0 4px;
  color:var(--ak-red);
  font-size:17px;
}
.ak-actions p{margin:0;color:#806c60;font-size:11px}
.ak-action-buttons{display:flex;gap:10px;flex-wrap:wrap}
.ak-print-area{display:none}

/* ---------- RESPONSIVE ---------- */
@media(max-width:1100px){
  .ak-birth-form{grid-template-columns:repeat(4,minmax(0,1fr))}
  .ak-main-result{grid-template-columns:1fr}
  .ak-panchang-cards{grid-template-columns:repeat(4,1fr)}
  .ak-bottom-grid{grid-template-columns:1fr}
}
@media(max-width:820px){
  .ak-birth-form{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ak-summary{grid-template-columns:1fr 1fr}
  .ak-chart-grid{grid-template-columns:1fr}
  .ak-chart-panel{
    border-right:0;
    border-bottom:1px solid var(--ak-border);
  }
  .ak-chart-panel:last-child{border-bottom:0}
  .ak-panchang-cards{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:650px){
  .ak-page{padding:0 8px 28px}
  .ak-form-card{padding:18px 14px}
  .ak-section-head h1{font-size:27px}
  .ak-birth-form{grid-template-columns:1fr}
  .ak-submit-wrap,.ak-submit-wrap .ak-primary-btn{width:100%}
  .ak-location-preview{align-items:flex-start}
  .ak-location-preview span:not(.ak-location-icon){
    display:block;
    margin:4px 0 0;
  }
  .ak-summary{grid-template-columns:1fr}
  .ak-summary>div{
    min-height:auto;
    border-right:0;
    border-bottom:1px solid var(--ak-border);
  }
  .ak-summary>div:last-child{border-bottom:0}
  .ak-chart-title-row{align-items:flex-start}
  .ak-chart-select{width:145px;max-width:48%}
  .ak-chart-canvas{min-height:340px;padding:15px 8px}
  .ak-panchang-cards{grid-template-columns:1fr 1fr}
  .ak-chart-legend{gap:7px 10px;font-size:10px}
  .ak-status-cell{min-width:120px}
  .ak-actions{align-items:flex-start;flex-direction:column}
  .ak-action-buttons{width:100%}
  .ak-action-buttons button{flex:1}
}

/* ---------- PRINT ---------- */
@media print{
  body *{visibility:hidden !important}
  #ak-print-area,#ak-print-area *{visibility:visible !important}
  #ak-print-area{
    display:block !important;
    position:absolute;
    left:0;
    top:0;
    width:100%;
    color:#111;
  }
  .no-print{display:none !important}
  @page{size:A4 landscape;margin:8mm}
}
