﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #0b1120;
    color: white;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================
   NAVBAR
========================= */

nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 8%;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #38bdf8;
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-block;
    border-radius: 8px;
    cursor: pointer;
}

.login {
    padding: 10px 20px;
    background: transparent;
    color: white;
    border: 1px solid #334155;
}

.register {
    padding: 11px 20px;
    background: #2563eb;
    color: white;
}

/* =========================
   HOMEPAGE
========================= */

.hero {
    min-height: 75vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.badge {
    background: #172554;
    color: #60a5fa;
    padding: 10px 18px;
    border-radius: 50px;
    margin-bottom: 25px;
    font-size: 14px;
}

.hero h1 {
    font-size: 60px;
    line-height: 1.1;
    margin-bottom: 25px;
}

.hero h1 span {
    color: #38bdf8;
}

.hero p {
    max-width: 650px;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 35px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.start {
    padding: 14px 28px;
    background: #2563eb;
    color: white;
}

.demo {
    padding: 14px 28px;
    background: #1e293b;
    color: white;
    border: 1px solid #334155;
}

/* =========================
   LOGIN / REGISTER
========================= */

.auth-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-box {
    width: 100%;
    max-width: 430px;
    background: #111827;
    border: 1px solid #1e293b;
    padding: 40px;
    border-radius: 16px;
}

.auth-logo {
    display: inline-block;
    margin-bottom: 30px;
}

.auth-box h2 {
    font-size: 30px;
    margin-bottom: 8px;
}

.auth-sub {
    color: #94a3b8;
    margin-bottom: 30px;
}

.auth-box label {
    display: block;
    margin-bottom: 8px;
    margin-top: 18px;
}

.auth-box input {
    width: 100%;
    padding: 14px;
    background: #0f172a;
    color: white;
    border: 1px solid #334155;
    border-radius: 8px;
    outline: none;
}

.auth-box input:focus {
    border-color: #38bdf8;
}

.auth-button {
    width: 100%;
    padding: 14px;
    margin-top: 25px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.auth-footer {
    text-align: center;
    color: #94a3b8;
    margin-top: 25px;
}

.auth-footer a {
    color: #38bdf8;
}

.alert {
    background: #172554;
    color: #93c5fd;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* =========================
   DASHBOARD
========================= */

.welcome {
    color: #94a3b8;
}

.dashboard {
    width: 86%;
    max-width: 1200px;
    margin: 50px auto;
}

.dashboard h1 {
    font-size: 38px;
    margin-bottom: 5px;
}

.dashboard-desc {
    color: #94a3b8;
    margin-top: 8px;
    margin-bottom: 35px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card {
    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 25px;
}

.card p {
    color: #94a3b8;
    margin-bottom: 12px;
}

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

.not-connected {
    color: #f59e0b;
    font-size: 20px !important;
}

.dashboard-section {
    margin-top: 30px;
    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 30px;
}

.dashboard-section h2 {
    margin-bottom: 10px;
}

.dashboard-section p {
    color: #94a3b8;
    margin-bottom: 20px;
}

.connect-button {
    border: none;
    border-radius: 8px;
    background: #ee4d2d;
    color: white;
    padding: 13px 25px;
    cursor: pointer;
}

button:hover,
.btn:hover {
    opacity: 0.85;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .hero h1 {
        font-size: 40px;
    }

    nav {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .dashboard {
        width: 92%;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .auth-box {
        padding: 30px 20px;
    }
}

/* =========================
   AUTOFLOW APP LAYOUT
========================= */

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: #0f172a;
    border-right: 1px solid #1e293b;
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    color: #38bdf8;
    font-size: 27px;
    font-weight: 700;
    padding: 0 12px;
    margin-bottom: 28px;
}

.sidebar-account {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 28px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: #2563eb;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.sidebar-account strong {
    display: block;
    font-size: 14px;
}

.sidebar-account span {
    color: #64748b;
    font-size: 12px;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.side-nav a {
    padding: 12px 14px;
    border-radius: 9px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 12px;
}

.side-nav a:hover {
    background: #172033;
    color: white;
}

.side-nav a.active {
    background: #1d4ed8;
    color: white;
}

.side-nav span {
    width: 20px;
    text-align: center;
}

.nav-divider {
    height: 1px;
    background: #1e293b;
    margin: 12px 0;
}

.sidebar-logout {
    margin-top: auto;
    border: 1px solid #334155;
    padding: 12px;
    border-radius: 9px;
    text-align: center;
    color: #94a3b8;
}

.sidebar-logout:hover {
    color: white;
    background: #172033;
}

.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    padding: 45px;
}

.mobile-topbar {
    display: none;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 34px;
    margin-bottom: 8px;
}

.page-header p {
    color: #94a3b8;
    line-height: 1.6;
}

.content-card {
    margin-top: 30px;
    background: #111827;
    border: 1px solid #1e293b;
    padding: 28px;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
}

.content-card h2 {
    margin: 8px 0;
}

.content-card p {
    color: #94a3b8;
    line-height: 1.6;
}

.section-label {
    font-size: 12px;
    letter-spacing: 1.5px;
    color: #38bdf8;
    font-weight: bold;
}

.primary-button {
    border: 0;
    background: #2563eb;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.shopee-button {
    background: #ee4d2d;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.panel,
.plan-card {
    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 28px;
}

.panel h2 {
    margin-bottom: 20px;
}

.empty-state {
    padding: 35px 5px;
    text-align: center;
    color: #94a3b8;
}

.empty-state strong,
.empty-state h2 {
    color: white;
    display: block;
    margin-bottom: 10px;
}

.status-warning {
    color: #f59e0b;
    font-size: 19px !important;
}

.plan-card {
    max-width: 600px;
}

.plan-card h2 {
    font-size: 32px;
    margin: 10px 0;
}

.plan-card p {
    color: #94a3b8;
    margin-bottom: 22px;
    line-height: 1.6;
}

.settings-panel {
    max-width: 650px;
}

.settings-panel label {
    display: block;
    color: #94a3b8;
    margin-top: 18px;
    margin-bottom: 8px;
}

.settings-panel input {
    width: 100%;
    padding: 14px;
    border: 1px solid #334155;
    background: #0b1120;
    border-radius: 8px;
    color: white;
}

@media (max-width: 850px) {

    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
        width: calc(100% - 200px);
        padding: 25px;
    }

    .two-column {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 650px) {

    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }

    .mobile-topbar {
        display: flex;
        justify-content: space-between;
        margin-bottom: 30px;
    }

    .mobile-logo {
        color: #38bdf8;
        font-weight: bold;
    }

    .content-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

}


/* AUTOFLOW MOBILE V2 STEP 152 */
@media (max-width: 650px) {

  .dashboard h1 {
    font-size: 30px;
    line-height: 1.2;
    margin-bottom: 8px;
  }

  .dashboard-desc {
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 18px;
  }

  .dashboard-grid {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;
    gap: 12px;
  }

  .dashboard-grid > * {
    min-width: 0;
    min-height: 112px;
    padding: 16px 13px;
    border-radius: 14px;
    overflow-wrap: anywhere;
  }

  .dashboard-grid > * strong {
    font-size: clamp(16px, 5vw, 24px);
    line-height: 1.25;
  }

  .main-content {
    min-width: 0;
  }

}


/* AUTOFLOW BENTO FLOW STEP 155 */
/* MOBILE ONLY */
@media (max-width: 650px) {

  .main-content {
    min-width: 0;
    padding: 15px 14px 28px;
  }

  .mobile-topbar {
    margin-bottom: 22px;
    gap: 10px;
  }

  .mobile-logo .af-brand-name {
    font-size: 22px;
  }

  .mobile-logo .af-brand-tagline {
    font-size: 9px;
  }

  .dashboard {
    padding: 0;
  }

  .dashboard h1 {
    font-size: 25px;
    line-height: 1.2;
    margin-bottom: 6px;
  }

  .dashboard-desc {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 16px;
  }

  .dashboard-grid {
    display: grid;
    grid-template-columns:
      minmax(0,1.05fr) minmax(0,0.95fr) !important;
    grid-auto-rows: minmax(76px,auto);
    gap: 9px;
    margin-bottom: 16px;
  }

  .dashboard-grid > * {
    min-width: 0;
    min-height: 0;
    padding: 13px;
    border-radius: 15px;
    background: #103448;
    border: 1px solid #215064;
    overflow-wrap: anywhere;
  }

  .dashboard-grid > * strong {
    font-size: 21px !important;
    line-height: 1.2;
  }

  /* Large cyan bento tile */
  .dashboard-grid > :nth-child(1) {
    grid-row: span 2;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(
      145deg,#33DCE0,#14B7C8
    );
    border-color: #46DCE1;
    color: #073D4C;
  }

  .dashboard-grid > :nth-child(1) * {
    color: #073D4C !important;
  }

  .dashboard-grid > :nth-child(1) strong {
    font-size: 27px !important;
  }

  /* Right side mini tiles */
  .dashboard-grid > :nth-child(2),
  .dashboard-grid > :nth-child(3) {
    min-height: 80px;
  }

  /* Full-width connection status */
  .dashboard-grid > :nth-child(4) {
    grid-column: 1 / -1;
    min-height: 66px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .dashboard-grid > :nth-child(4) strong {
    font-size: 14px !important;
  }

  .dashboard-section {
    padding: 17px 15px;
    border-radius: 16px;
    margin-bottom: 12px;
  }

  .dashboard-section h2 {
    font-size: 17px;
    line-height: 1.3;
  }

  .dashboard-section p {
    font-size: 12px;
    line-height: 1.5;
  }

  .panel {
    border-radius: 16px;
  }
}
