/* companylist.com.hk — Gateway Registrations Limited */
:root {
  --navy:#1a2c4e;
  --navy-dark:#111d34;
  --navy-light:#243558;
  --gold:#c9a84c;
  --gold-light:#f0d898;
  --gold-pale:#fdf6e3;
  --green:#1a7a4a;
  --green-light:#e8f5ee;
  --amber:#b36800;
  --amber-light:#fff3e0;
  --red:#b52a2a;
  --red-light:#fdeaea;
  --gray-1:#f7f8fa;
  --gray-2:#eef0f3;
  --gray-3:#d4d8e0;
  --gray-4:#9aa0ad;
  --gray-5:#555e6e;
  --text:#1a2033;
  --text-sec:#555e6e;
  --white:#ffffff;
  --radius:6px;
  --radius-lg:10px;
  --shadow:0 1px 4px rgba(0,0,0,0.08);
  --shadow-md:0 4px 16px rgba(0,0,0,0.10);
}

*{box-sizing:border-box;margin:0;padding:0;}
html{font-size:15px;}
body{font-family:'Segoe UI','Noto Sans TC','Microsoft JhengHei',sans-serif;background:var(--gray-1);color:var(--text);line-height:1.6;}
a{color:var(--navy);text-decoration:none;}
a:hover{color:var(--gold);}

/* ── HEADER ── */
.site-header{background:var(--navy);color:var(--white);padding:0 24px;display:flex;align-items:center;justify-content:space-between;height:60px;position:sticky;top:0;z-index:100;box-shadow:var(--shadow-md);}
.site-logo .logo-text{font-size:1.15rem;font-weight:700;letter-spacing:.01em;}
.site-logo .logo-text span{color:var(--gold);}
.site-logo .logo-sub{font-size:.72rem;color:var(--gray-3);margin-top:1px;}
.header-right{display:flex;align-items:center;gap:16px;}
.updated-badge{font-size:.72rem;color:var(--gray-3);text-align:right;line-height:1.4;}
.updated-badge b{color:var(--gold-light);}
.grl-link{font-size:.75rem;color:var(--gold-light);border:1px solid rgba(201,168,76,0.4);padding:4px 10px;border-radius:20px;white-space:nowrap;}
.grl-link:hover{background:rgba(201,168,76,0.15);color:var(--gold-light);}

/* ── ENTRY PAGE ── */
.entry-page{min-height:100vh;display:flex;flex-direction:column;}
.entry-hero{background:var(--navy);color:var(--white);text-align:center;padding:64px 24px 48px;}
.entry-hero h1{font-size:2rem;font-weight:700;margin-bottom:10px;}
.entry-hero h1 span{color:var(--gold);}
.entry-hero p{font-size:.95rem;color:var(--gray-3);max-width:520px;margin:0 auto;}
.entry-cards{display:flex;gap:24px;justify-content:center;padding:48px 24px;flex-wrap:wrap;}
.entry-card{background:var(--white);border:1.5px solid var(--gray-2);border-radius:var(--radius-lg);padding:36px 40px;width:300px;text-align:center;cursor:pointer;transition:all .2s;box-shadow:var(--shadow);text-decoration:none;color:var(--text);display:block;}
.entry-card:hover{border-color:var(--gold);box-shadow:0 6px 24px rgba(201,168,76,0.15);transform:translateY(-2px);color:var(--text);}
.entry-card .card-flag{font-size:3rem;margin-bottom:16px;}
.entry-card h2{font-size:1.15rem;font-weight:700;color:var(--navy);margin-bottom:6px;}
.entry-card .card-sub{font-size:.82rem;color:var(--gray-4);}
.entry-card .card-arrow{margin-top:20px;font-size:.82rem;color:var(--gold);font-weight:600;}
.entry-footer{margin-top:auto;text-align:center;padding:24px;font-size:.78rem;color:var(--gray-4);border-top:1px solid var(--gray-2);}
.entry-footer a{color:var(--navy);font-weight:600;}

/* ── TOOLBAR ── */
.toolbar{background:var(--white);border-bottom:1px solid var(--gray-2);padding:12px 20px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;position:sticky;top:60px;z-index:90;}
.toolbar input[type="text"]{font-size:.85rem;padding:7px 12px;border:1px solid var(--gray-3);border-radius:var(--radius);background:var(--gray-1);color:var(--text);width:200px;outline:none;transition:border .15s;}
.toolbar input[type="text"]:focus{border-color:var(--navy);background:var(--white);}
.toolbar select{font-size:.82rem;padding:7px 10px;border:1px solid var(--gray-3);border-radius:var(--radius);background:var(--gray-1);color:var(--text);outline:none;cursor:pointer;}
.toolbar select:focus{border-color:var(--navy);}
.toolbar-sep{flex:1;}
.btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:var(--radius);font-size:.82rem;font-weight:600;cursor:pointer;border:none;transition:all .15s;white-space:nowrap;}
.btn-outline{background:var(--white);border:1px solid var(--gray-3);color:var(--gray-5);}
.btn-outline:hover{border-color:var(--navy);color:var(--navy);}
.btn-navy{background:var(--navy);color:var(--white);}
.btn-navy:hover{background:var(--navy-dark);}
.btn-gold{background:var(--gold);color:var(--white);}
.btn-gold:hover{background:#a8873a;}
.btn-sm{padding:5px 10px;font-size:.78rem;}

/* ── CATEGORY HEADINGS ── */
.category-heading{background:var(--navy);color:var(--white);padding:8px 20px;font-size:.82rem;font-weight:700;letter-spacing:.03em;display:flex;align-items:center;gap:10px;}
.category-heading .cat-count{font-weight:400;color:var(--gray-3);font-size:.75rem;}
.category-heading.premium{background:linear-gradient(90deg,#1a2c4e 0%,#3a2200 100%);border-left:3px solid var(--gold);}

/* ── TABLE ── */
.list-table-wrap{overflow-x:auto;}
.list-table{width:100%;border-collapse:collapse;min-width:640px;}
.list-table thead tr{background:var(--gray-2);}
.list-table th{padding:9px 14px;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--gray-5);text-align:left;white-space:nowrap;border-bottom:1px solid var(--gray-3);}
.list-table td{padding:9px 14px;font-size:.85rem;border-bottom:1px solid var(--gray-2);vertical-align:middle;}
.list-table tbody tr{background:var(--white);transition:background .1s;}
.list-table tbody tr:hover{background:var(--gray-1);}
.list-table tbody tr.selected{background:#e8f0fb;}
.list-table tbody tr.unavailable{opacity:.5;}
.list-table tbody tr.unavailable td{color:var(--gray-4);}
.col-check{width:36px;}
.col-id{width:80px;color:var(--gray-4);font-size:.78rem;}
.col-en{font-weight:500;}
.col-zh{font-size:.82rem;color:var(--gray-5);}
.col-date{white-space:nowrap;font-size:.82rem;color:var(--gray-5);}
.col-status{width:100px;}

/* ── BADGES ── */
.badge{display:inline-block;font-size:.72rem;font-weight:700;padding:2px 9px;border-radius:20px;white-space:nowrap;}
.badge-available{background:var(--green-light);color:var(--green);}
.badge-reserved{background:var(--amber-light);color:var(--amber);}
.badge-sold{background:var(--red-light);color:var(--red);}
.badge-premium{background:var(--gold-pale);color:#7a5500;border:1px solid #e6c96a;margin-left:6px;}

/* ── RESERVE BAR ── */
.reserve-bar{position:fixed;bottom:0;left:0;right:0;background:var(--navy);color:var(--white);padding:12px 24px;display:flex;align-items:center;justify-content:space-between;gap:12px;z-index:200;box-shadow:0 -4px 20px rgba(0,0,0,.2);transform:translateY(100%);transition:transform .25s ease;}
.reserve-bar.visible{transform:translateY(0);}
.reserve-bar-info{font-size:.88rem;}
.reserve-bar-info span{color:var(--gold);font-weight:700;font-size:1.1rem;}
.reserve-bar-actions{display:flex;gap:10px;align-items:center;}
.limit-msg{font-size:.78rem;color:var(--gold-light);background:rgba(255,255,255,.08);padding:4px 10px;border-radius:20px;display:none;}
.limit-msg.show{display:inline-block;}

/* ── MODAL ── */
.modal-backdrop{position:fixed;inset:0;background:rgba(10,16,32,.55);z-index:300;display:flex;align-items:center;justify-content:center;padding:20px;opacity:0;pointer-events:none;transition:opacity .2s;}
.modal-backdrop.show{opacity:1;pointer-events:all;}
.modal{background:var(--white);border-radius:var(--radius-lg);width:100%;max-width:480px;max-height:90vh;overflow-y:auto;box-shadow:var(--shadow-md);transform:translateY(12px);transition:transform .2s;}
.modal-backdrop.show .modal{transform:translateY(0);}
.modal-header{background:var(--navy);color:var(--white);padding:18px 24px;border-radius:var(--radius-lg) var(--radius-lg) 0 0;}
.modal-header h2{font-size:1rem;font-weight:700;}
.modal-header p{font-size:.78rem;color:var(--gray-3);margin-top:3px;}
.modal-body{padding:20px 24px;}
.selected-pills{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:16px;}
.pill{background:var(--gold-pale);color:#7a5500;font-size:.75rem;padding:3px 10px;border-radius:20px;border:1px solid #e6c96a;}
.form-group{margin-bottom:14px;}
.form-group label{font-size:.78rem;font-weight:600;color:var(--gray-5);display:block;margin-bottom:5px;}
.form-group label .req{color:var(--red);}
.form-group input,.form-group select,.form-group textarea{width:100%;font-size:.85rem;padding:8px 11px;border:1px solid var(--gray-3);border-radius:var(--radius);background:var(--gray-1);color:var(--text);outline:none;transition:border .15s;font-family:inherit;}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{border-color:var(--navy);background:var(--white);}
.form-group textarea{resize:none;height:72px;}
.form-note{font-size:.72rem;color:var(--gray-4);margin-top:12px;line-height:1.5;}
.modal-actions{display:flex;gap:10px;margin-top:16px;}
.modal-actions .btn{flex:1;justify-content:center;padding:10px;}

/* ── SUCCESS ── */
.success-view{text-align:center;padding:32px 24px;}
.success-icon{width:56px;height:56px;border-radius:50%;background:var(--green-light);display:flex;align-items:center;justify-content:center;margin:0 auto 16px;}
.success-icon svg{width:26px;height:26px;}
.success-view h2{font-size:1.1rem;font-weight:700;color:var(--navy);margin-bottom:8px;}
.success-view p{font-size:.85rem;color:var(--gray-5);line-height:1.6;margin-bottom:8px;}

/* ── DOWNLOAD BAR ── */
.download-bar{background:var(--white);border-top:1px solid var(--gray-2);border-bottom:1px solid var(--gray-2);padding:8px 20px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;position:sticky;top:109px;z-index:80;}
.download-label{font-size:.78rem;color:var(--gray-4);font-weight:600;text-transform:uppercase;letter-spacing:.05em;}

/* ── EMPTY STATE ── */
.empty-state{text-align:center;padding:60px 20px;color:var(--gray-4);}
.empty-state p{font-size:.88rem;margin-top:8px;}

/* ── PAGE FOOTER ── */
.page-footer{text-align:center;padding:20px;font-size:.75rem;color:var(--gray-4);border-top:1px solid var(--gray-2);background:var(--white);margin-top:40px;}
.page-footer a{color:var(--navy);font-weight:600;}
.page-footer a:hover{color:var(--gold);}

/* ── RESPONSIVE ── */
@media(max-width:640px){
  .site-header{padding:0 14px;height:56px;}
  .site-logo .logo-sub{display:none;}
  .toolbar{padding:10px 14px;top:56px;}
  .toolbar input[type="text"]{width:140px;}
  .entry-hero h1{font-size:1.4rem;}
  .entry-card{width:100%;max-width:320px;padding:28px 24px;}
  .reserve-bar{padding:10px 14px;flex-wrap:wrap;}
  .header-right .updated-badge{display:none;}
}

/* ── ENTRY CARD GOLD BUTTON ── */
.entry-card { padding: 40px 44px; width: 340px; }
.entry-card .card-btn { margin-top: 24px; background: var(--gold); color: var(--white); font-size: .88rem; font-weight: 700; padding: 10px 20px; border-radius: var(--radius); display: inline-block; }
.entry-card:hover .card-btn { background: #a8873a; }

/* ── COMBINED NAME COLUMN ── */
.col-name { min-width: 200px; }
.name-en { font-weight: 500; font-size: .85rem; color: var(--text); }
.name-zh { font-size: .78rem; color: var(--gray-5); margin-top: 2px; }


/* ── FIXED TABLE COLUMN WIDTHS — ensures alignment across all categories ── */
.list-table { table-layout: fixed; width: 100%; }
.list-table .col-check { width: 36px; }
.list-table .col-id    { width: 80px; }
.list-table .col-name  { width: auto; }
.list-table .col-date  { width: 64px; text-align: center; }
.list-table .col-status{ width: 96px; }
.list-table td, .list-table th { overflow: hidden; text-overflow: ellipsis; }


/* ── FIX 6/7: Consistent column alignment across all filtered views ── */
.list-table { table-layout: fixed; width: 100%; min-width: 520px; }
.list-table col.col-check { width: 36px; }
.list-table col.col-id    { width: 80px; }
.list-table col.col-date  { width: 64px; }
.list-table col.col-status{ width: 96px; }
.list-table col.col-name  { width: auto; }

/* ── FIX 9: Clear button visible on dark reserve bar ── */
.reserve-bar .btn-clear {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.5);
  color: #ffffff;
  font-size: .82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
}
.reserve-bar .btn-clear:hover {
  background: rgba(255,255,255,0.15);
}

/* ── FIX 5: Premium badge style ── */
.badge-premium {
  background: var(--gold-pale);
  color: #7a5500;
  border: 1px solid var(--gold);
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  white-space: nowrap;
}


/* ── FIX: Two-row alignment — centre Incorp and Status vertically ── */
.list-table td { vertical-align: middle; }
.list-table .col-date { vertical-align: middle; text-align: center; }
.list-table .col-status { vertical-align: middle; text-align: left; }
.list-table .col-check { vertical-align: middle; text-align: center; }
.list-table .col-id { vertical-align: middle; }

/* Ensure name column text aligns top for multi-line readability */
.list-table .col-name { vertical-align: top; padding-top: 10px; padding-bottom: 10px; }

/* Row minimum height for consistency */
.list-table tbody tr { min-height: 48px; }
.name-en { line-height: 1.4; }
.name-zh { line-height: 1.4; margin-top: 3px; }

/* Remove duplicate table-layout declarations — keep only one */


/* ── Aged Premium Apply badge ── */
.badge-aged {
  background: #fff8e1;
  color: #5d4200;
  border: 1px solid #d4a017;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  white-space: nowrap;
}
