/* ================================================================
   DS Webhosting — Customer Portal Styles
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:        #1a70c0;
  --blue-dark:   #155a9e;
  --blue-light:  #e8f2fc;
  --grey-dark:   #2d2d35;
  --grey:        #4a4a52;
  --grey-mid:    #6b7280;
  --grey-light:  #f3f4f6;
  --border:      #dde3ea;
  --white:       #ffffff;
  --text:        #333740;
  --success:     #16a34a;
  --success-bg:  #f0fdf4;
  --error:       #dc2626;
  --error-bg:    #fef2f2;
  --warning:     #d97706;
  --warning-bg:  #fffbeb;
  --radius:      8px;
  --radius-lg:   14px;
  --shadow:      0 2px 12px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 24px rgba(0,0,0,0.11);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--grey-light);
  min-height: 100vh;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 {
  font-family: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--grey-dark);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── HEADER ── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  font-family: 'Barlow', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--grey-dark);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-logo span { color: var(--blue); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-nav a {
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--grey);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s;
}

.header-nav a:hover {
  color: var(--blue);
  background: var(--blue-light);
}

.header-nav a.active {
  color: var(--blue);
  background: var(--blue-light);
  font-weight: 600;
}

.header-nav a.btn-primary {
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
}

.header-nav a.btn-primary:hover {
  background: var(--blue-dark);
  color: var(--white);
}

/* ── LAYOUT ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 5vw;
}

.container--narrow {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 5vw;
}

.page-content {
  padding: 2.5rem 5vw;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.card-header h2 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.card-header p {
  font-size: 0.88rem;
  color: var(--grey-mid);
  margin: 0;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.btn--primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,112,192,0.3);
}

.btn--outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}

.btn--outline:hover {
  background: var(--blue-light);
  text-decoration: none;
}

.btn--danger {
  background: transparent;
  color: var(--error);
  border-color: var(--error);
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
}

.btn--danger:hover {
  background: var(--error-bg);
  text-decoration: none;
}

.btn--sm {
  font-size: 0.82rem;
  padding: 0.4rem 0.9rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn--full { width: 100%; }

/* ── FORMS ── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--grey-dark);
  margin-bottom: 0.4rem;
}

.form-group label .req { color: var(--blue); margin-left: 2px; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,112,192,0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--grey-mid);
  margin-top: 0.35rem;
}

.form-error {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 0.35rem;
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── ALERTS ── */
.alert {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  display: none;
}

.alert--success {
  background: var(--success-bg);
  border: 1px solid #86efac;
  color: var(--success);
}

.alert--error {
  background: var(--error-bg);
  border: 1px solid #fca5a5;
  color: var(--error);
}

.alert--warning {
  background: var(--warning-bg);
  border: 1px solid #fcd34d;
  color: var(--warning);
}

.alert--info {
  background: var(--blue-light);
  border: 1px solid #93c5fd;
  color: var(--blue-dark);
}

.alert.show { display: block; }

/* ── STATUS BADGE ── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--active    { background: #dcfce7; color: #15803d; }
.badge--suspended { background: #fef3c7; color: #b45309; }
.badge--pending   { background: var(--blue-light); color: var(--blue-dark); }
.badge--error     { background: var(--error-bg); color: var(--error); }

/* ── DASHBOARD GRID ── */
.dash-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.dash-sidebar .card { padding: 0; overflow: hidden; }

.dash-nav { list-style: none; }

.dash-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  color: var(--grey);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.dash-nav a:hover {
  background: var(--grey-light);
  color: var(--blue);
}

.dash-nav a.active {
  background: var(--blue-light);
  color: var(--blue);
  border-left-color: var(--blue);
  font-weight: 600;
}

.dash-nav a svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── FILE MANAGER ── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--grey-light);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--blue);
  background: var(--blue-light);
}

.upload-zone svg {
  width: 40px;
  height: 40px;
  stroke: var(--grey-mid);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 0.75rem;
}

.upload-zone.dragover svg { stroke: var(--blue); }

.upload-zone p {
  color: var(--grey-mid);
  font-size: 0.9rem;
  margin: 0;
}

.upload-zone p strong { color: var(--text); }

.upload-zone input[type="file"] {
  display: none;
}

.file-list {
  margin-top: 1.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.file-item:last-child { border-bottom: none; }

.file-item__name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  word-break: break-all;
}

.file-item__meta {
  font-size: 0.78rem;
  color: var(--grey-mid);
  white-space: nowrap;
}

/* ── STORAGE BAR ── */
.storage-bar {
  margin-top: 1rem;
}

.storage-bar__track {
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.storage-bar__fill {
  height: 100%;
  background: var(--blue);
  border-radius: 100px;
  transition: width 0.3s;
}

.storage-bar__fill.warning { background: var(--warning); }
.storage-bar__fill.danger  { background: var(--error); }

.storage-bar__label {
  font-size: 0.8rem;
  color: var(--grey-mid);
  display: flex;
  justify-content: space-between;
}

/* ── UPLOAD PROGRESS ── */
.upload-progress {
  display: none;
  margin-top: 1rem;
}

.upload-progress.show { display: block; }

.progress-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  padding: 0.4rem 0;
}

.progress-item__name { flex: 1; color: var(--text); }
.progress-item__status { color: var(--grey-mid); font-size: 0.78rem; }
.progress-item__status.success { color: var(--success); }
.progress-item__status.error   { color: var(--error); }

/* ── STAT CARDS ── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}

.stat-card__label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-mid);
  margin-bottom: 0.4rem;
}

.stat-card__value {
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--grey-dark);
  line-height: 1;
}

/* ── FOOTER ── */


/* ── HERO (landing) ── */
.hero {
  background: linear-gradient(135deg, #f0f6ff 0%, #e8f2fc 50%, #f5f7fa 100%);
  border-bottom: 1px solid var(--border);
  padding: 5rem 5vw 4rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.hero h1 span { color: var(--blue); }

.hero p {
  font-size: 1.1rem;
  color: var(--grey-mid);
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── PRICING ── */
.pricing-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  max-width: 360px;
  margin: 0 auto;
}

.pricing-card.featured {
  border-color: var(--blue);
  box-shadow: 0 8px 32px rgba(26,112,192,0.15);
}

.pricing-amount {
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  margin: 1rem 0 0.25rem;
}

.pricing-period {
  font-size: 0.9rem;
  color: var(--grey-mid);
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
}

.pricing-features li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.9rem;
  padding: 0.4rem 0;
  color: var(--text);
}

.pricing-features li::before {
  content: '✓';
  color: var(--blue);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── LOADING SPINNER ── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── SUBDOMAIN INPUT ── */
.subdomain-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.subdomain-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,112,192,0.12);
}

.subdomain-wrap input {
  flex: 1;
  border: none;
  box-shadow: none;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}

.subdomain-wrap input:focus {
  border: none;
  box-shadow: none;
}

.subdomain-suffix {
  padding: 0.7rem 0.9rem;
  background: var(--grey-light);
  color: var(--grey-mid);
  font-size: 0.88rem;
  white-space: nowrap;
  border-left: 1px solid var(--border);
}

.subdomain-status {
  font-size: 0.8rem;
  margin-top: 0.35rem;
  height: 1.2em;
}

.subdomain-status.available { color: var(--success); }
.subdomain-status.taken     { color: var(--error); }
.subdomain-status.checking  { color: var(--grey-mid); }


/* ── FOOTER (updated) ── */
.site-footer {
  background: var(--grey-dark);
  color: rgba(255,255,255,0.5);
  margin-top: 4rem;
  font-size: 0.82rem;
}
.site-footer a { color: rgba(255,255,255,0.6); text-decoration: none; transition: color 0.15s; }
.site-footer a:hover { color: rgba(255,255,255,0.9); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 2.5rem 5vw;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand img { height: 40px !important; width: auto !important; margin-bottom: 0.75rem; display: block; }
.footer-brand p { color: rgba(255,255,255,0.5); font-size: 0.82rem; margin: 0.15rem 0; }
.footer-col-title { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.35); margin-bottom: 0.75rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1rem 5vw;
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem;
  font-size: 0.78rem; color: rgba(255,255,255,0.3);
  max-width: 1100px; margin: 0 auto;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .dash-grid { grid-template-columns: 1fr; }
  .form-row  { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr; }
}
