@import url('fonts.css');

/* ================================
   CSS Variables (Design System)
   ================================ */
:root {
    /* Primary Colors */
    --primary: #6F0E37;
    --primary-active: #8c1a36;
    --primary-light: #923468;
    --primary-pale: #7F2549;
    
    /* Background Colors */
    --bg-cream: #F5EADA;
    --bg-light: #FBF8F3;
    --bg-white: #FFFFFF;
    
    /* Border Colors */
    --border-light: #EBE1E1;
    --border-gray: #ECE7E7;
    --border-muted: #CBBFC4;
    
    /* Text Colors */
    --text-primary: #010914;
    --text-gray: #989898;
    --text-muted: #AAAAAA;
    --text-placeholder: #bb93a4;
    
    /* State Colors */
    --disabled-bg: #E9DCE1;
    --disabled-text: #eecddb;
    --badge-red: #FF5733;
    --success: #22c55e;
    --error: #ef4444;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 50%;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --font-family: 'Pelak', 'IRANSans', sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    
    /* Layout */
    --container-max: 568px;
    --content-max: 390px;
    --header-height: 80px;
    --tabbar-height: 80px;
}

/* ================================
   Reset & Base Styles
   ================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-white);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior-y: none;
}

/* ================================
   Layout Containers
   ================================ */
.app-container {
    max-width: var(--container-max);
    margin: 0 auto;
    min-height: 100vh;
    background-color: var(--bg-white);
    position: relative;
}

.content-container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: var(--spacing-md);
}

.page-content {
    padding-top: var(--header-height);
    padding-bottom: calc(var(--tabbar-height) + 20px);
    min-height: 100vh;
}

.auth-content {
    min-height: 570px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    text-align: center;
}

/* ================================
   Typography
   ================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-base); }
h5 { font-size: var(--font-size-sm); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.font-light { font-weight: 300; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-primary { color: var(--primary); }
.text-gray { color: var(--text-gray); }
.text-muted { color: var(--text-muted); }
.text-white { color: white; }

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }

/* ================================
   Buttons
   ================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0 var(--spacing-lg);
    height: 60px;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

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

.btn-primary:hover {
    background-color: var(--primary-active);
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-color: var(--disabled-bg);
    color: var(--disabled-text);
    cursor: not-allowed;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--bg-light);
}

.btn-ghost {
    background-color: transparent;
    border: 1px solid white;
    color: white;
    margin-bottom: 1rem;
}

.btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: none;
    height: auto;
    padding: var(--spacing-sm);
}

.btn-sm {
    height: 40px;
    font-size: var(--font-size-sm);
    padding: 0 var(--spacing-md);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-full);
}

/* ================================
   Forms & Inputs
   ================================ */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    padding-right: var(--spacing-sm);
}

.form-input {
    width: 100%;
    height: 52px;
    padding: 0 var(--spacing-md);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: 300;
    color: var(--text-primary);
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    border-color: var(--primary);
}

.form-input::placeholder {
    color: var(--text-placeholder);
    font-weight: 300;
}

.form-input:disabled {
    background-color: var(--bg-light);
    cursor: not-allowed;
}

/* Phone Input Group */
.phone-input-group {
    display: flex;
    flex-direction: row-reverse;
}

.phone-prefix {
    width: 70px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    border-left: none;
    font-size: var(--font-size-base);
    color: var(--text-gray);
    direction: ltr;
}

.phone-input {
    flex: 1;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    direction: ltr;
    text-align: left;
}

/* OTP Input */
.otp-container {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    direction: ltr;
}

.otp-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: var(--font-size-xl);
    font-weight: 500;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm);
    outline: none;
}

.otp-input:focus {
    border-color: var(--primary-active);
    box-shadow: 0 0 0 2px rgba(111, 14, 55, 0.1);
}

/* Select */
.form-select {
    width: 100%;
    height: 52px;
    padding: 0 var(--spacing-md);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: 300;
    color: var(--primary);
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236F0E37' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
}

.form-select:focus {
    border-color: var(--primary);
}

/* Checkbox */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    max-height: 200px;
    overflow-y: auto;
    padding: var(--spacing-md);
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs);
    background-color: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
}

.radio-item {
    flex: 1;
}

.radio-item input[type="radio"] {
    display: none;
}

.radio-item label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 var(--spacing-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--primary);
    background-color: var(--bg-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-item input[type="radio"]:checked + label {
    background-color: var(--primary);
    color: white;
}

/* Filter Tabs - Full Width */
.filter-tabs-wrapper {
    width: 100%;
    padding: 0 var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.filter-tabs {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs);
    background-color: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
}

.filter-tab-item {
    flex: 1;
}

.filter-tab-item input[type="radio"] {
    display: none;
}

.filter-tab-item label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 var(--spacing-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--primary);
    background-color: var(--bg-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.filter-tab-item input[type="radio"]:checked + label {
    background-color: var(--primary);
    color: white;
}

/* ================================
   Cards
   ================================ */
.card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
}

.card-light {
    background-color: var(--bg-light);
}

.stat-card {
    width: 47%;
    height: 192px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .icon-wrapper {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    border-radius: var(--radius-full);
}

.stat-card .stat-value {
    font-size: 22px;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-primary);
}

.schedule-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 13px;
    margin-top: var(--spacing-md);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.schedule-card:hover {
    background-color: #f3efe9;
}

.schedule-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-card .time-badge {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.service-card {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.service-card .category-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: var(--bg-cream);
    color: var(--primary);
    font-size: var(--font-size-xs);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
}

/* Profile Card */
.profile-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.profile-card:hover {
    background-color: var(--bg-light);
}

.profile-card .profile-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.profile-card .profile-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.profile-card .profile-name {
    font-size: var(--font-size-sm);
    font-weight: 300;
}

.profile-card .profile-phone {
    font-weight: 700;
}

/* Link Card - Clickable navigation cards */
.link-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-md);
    background-color: var(--bg-white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.link-card-rtl {
    flex-direction: row;
}

.link-card:hover {
    background-color: var(--bg-light);
}

.link-card:active {
    transform: scale(0.99);
}

.link-card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.link-card-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
}

.link-card-value {
    font-size: var(--font-size-md);
   
    color: var(--text-primary);
}

.link-card-chevron {
    font-size: 20px;
    color: var(--primary);
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-card-chevron i {
    font-size: 18px;
}

/* ================================
   Header
   ================================ */
.app-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--container-max);
    background-color: var(--bg-cream);
    z-index: 100;
    padding: var(--spacing-md);
    min-height: 60px;
    display: flex;
    align-items: center;
}

.app-header-full {
    max-width: 100%;
    left: 0;
    transform: none;
}

.header-content {
    max-width: var(--content-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 40px;
}

.header-content-full {
    max-width: 100%;
    justify-content: space-between;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.header-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--primary-pale);
    font-weight: 700;
}

.header-title .back-btn {
    background: none;
    border: none;
    color: var(--primary-pale);
    font-size: var(--font-size-xl);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.header-logo {
    width: 60px;
    height: 40px;
    object-fit: contain;
}

/* ================================
   Tab Bar
   ================================ */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--content-max) !important;
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-muted);
    padding: .5rem 0;
    z-index: 100;
}

.tab-list {
    display: flex;
    justify-content: space-between;
    list-style: none;
}

.tab-item {
    flex: 1;
    display: flex;
    position: relative;
}

.tab-item .tab-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    padding: var(--spacing-sm) 0;
    transition: opacity 0.2s ease;
}

.tab-item .tab-link:active {
    opacity: 0.7;
}

.tab-item .tab-icon {
    width: 24px;
    height: 24px;
}

.tab-item .tab-label {
    font-size: .8rem;
    font-weight: 500;
    color: #7a7a7a;
    font-family: var(--font-family);
}

.tab-item.active .tab-label {
    color: var(--primary);
    font-weight: 600;
}

.tab-item .badge {
    position: absolute;
    top: -3px;
    right: 14px;
    width: 8px;
    height: 8px;
    background-color: var(--badge-red);
    border-radius: var(--radius-full);
    display: none;
}

.tab-item .badge.show {
    display: block;
}

/* ================================
   Landing Page
   ================================ */
.splash-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--primary);
}

.splash-screen .logo {
    width: 130px;
    height: auto;
    object-fit: contain;
}

.splash-screen .version {
    margin-top: var(--spacing-md);
    color: white;
    font-weight: 200;
}

.onboarding {
    background-image: url('../images/main-image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.onboarding::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.onboarding > * {
    position: relative;
    z-index: 1;
}

.onboarding .logo {
    width: 120px;
    height: auto;
    object-fit: contain;
    margin-bottom: var(--spacing-xl);
}

.landing-tagline {
    text-align: center;
    color: white;
    margin-bottom: var(--spacing-xl);
}

.landing-tagline .tagline-main {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
}

.landing-tagline .tagline-sub {
    font-size: 0.95rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.landing-tagline .tagline-features {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xl);

}

.landing-tagline .tagline-features span {
    opacity: 0.9;
}

.onboarding .btn-wrapper {
    width: 60%;
}

/* ================================
   Auth Pages
   ================================ */
.auth-header {
    text-align: center;
    padding: var(--spacing-md);
}

.auth-header .logo {
    width: 90px;
    height: 90px;
}

.auth-form {
    padding: var(--spacing-md);
}

.auth-title {
    margin-bottom: var(--spacing-sm);
}

.auth-subtitle {
    font-weight: 300;
    margin-bottom: var(--spacing-lg);
}

.auth-terms {
    font-size: var(--font-size-sm);
    font-weight: 200;
    margin-top: var(--spacing-md);
}

.auth-terms .brand {
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
}

/* Phone Badge (OTP page) */
.phone-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--bg-cream);
    border-radius: var(--radius-lg);
    color: var(--primary-light);
}

.phone-badge .edit-icon {
    color: var(--primary);
    cursor: pointer;
    font-size: var(--font-size-xl);
}

.timer-text {
    font-size: var(--font-size-sm);
    font-weight: 200;
    margin-top: var(--spacing-md);
}

/* ================================
   Dashboard
   ================================ */
.greeting {
    font-size: var(--font-size-xl);
    font-weight: 800;
    margin-bottom: var(--spacing-xs);
}

.greeting-date {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
}

.banner img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.banner .overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    padding: var(--spacing-md);
    display: flex;
    align-items: flex-end;
}

.banner .overlay-text {
    color: white;
    font-weight: 700;
    line-height: 1.6;
}

/* ================================
   Quick Stats (Compact)
   ================================ */
/* Stats Grid - 2x2 Layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.stats-grid .stat-card {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.stats-grid .stat-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.stats-grid .stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #F5F0EB;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.stats-grid .stat-card-icon svg {
    width: 26px;
    height: 26px;
}

.stats-grid .stat-card-content {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.stats-grid .stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stats-grid .stat-card-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-gray);
    margin-top: 4px;
}

/* Legacy Quick Stats (kept for compatibility) */
.quick-stats-section {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
}

.quick-stats-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.quick-stats {
    display: flex;
    gap: var(--spacing-sm);
}

.quick-stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--spacing-md) var(--spacing-sm);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
}

.quick-stat-item:hover {
    background: var(--bg-cream);
}

.quick-stat-icon {
    width: 28px;
    height: 28px;
    color: var(--primary);
    opacity: 0.8;
}

.quick-stat-icon svg {
    width: 100%;
    height: 100%;
}

.quick-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.quick-stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-gray);
}

.quick-stat-rating .quick-stat-icon {
    color: var(--primary);
}

.quick-stat-rating .quick-stat-value {
    color: var(--primary);
}

/* Legacy stats-row (kept for compatibility) */
.stats-row {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

/* ================================
   Share Section
   ================================ */
.share-section {
    margin-bottom: var(--spacing-xl);
}

.share-intro {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: var(--spacing-sm);
    font-weight: 400;
}

.share-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

.share-card-content {
    display: flex;
    gap: var(--spacing-sm);
    flex-direction: row-reverse;
}

.share-link-input {
    flex: 1;
    padding: 12px 14px;
    font-family: var(--font-family);
    font-size: 13px;
    color: var(--text-gray);
    background: var(--bg-white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-sm);
    direction: ltr;
    text-align: left;
}

.share-link-btn {
    width: 41px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.share-link-btn:hover {
    background: var(--primary-active);
    transform: scale(1.02);
}

.share-link-btn svg {
    width: 22px;
    height: 22px;
}

/* ================================
   Articles Section (Horizontal Scroll)
   ================================ */
.articles-section {
    margin-bottom: var(--spacing-xl);
    margin-top: 48px;
}

.articles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.articles-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text-primary);
}

.articles-more {
    font-size: var(--font-size-xs);
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.articles-more:hover {
    opacity: 0.8;
}

.articles-scroll {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-left: calc(-1 * var(--spacing-md));
    margin-right: calc(-1 * var(--spacing-md));
    padding: 0 var(--spacing-md);
    padding-bottom: var(--spacing-sm);
}

.articles-scroll::-webkit-scrollbar {
    display: none;
}

.article-card-mini {
    display: flex;
    flex-direction: column;
    width: 140px;
    flex-shrink: 0;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.article-card-mini:hover {
    transform: translateY(-2px);
}

.article-thumb {
    width: 140px;
    height: 90px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
    background: var(--bg-light);
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-thumb-placeholder img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.article-card-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.article-card {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-light);
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.article-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-image-logo {
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.article-image-logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.article-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.article-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-desc {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-date {
    font-size: 11px;
    color: var(--text-gray);
    margin-top: auto;
}

/* Share Link Section */
.share-link-section {
    margin-top: var(--spacing-md);
}

.share-link-description {
    font-size: var(--font-size-sm);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

/* Copy Input */
.copy-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-lg);
}

.copy-input-wrapper.copy-input-tall {
    padding: var(--spacing-md);
}

.copy-input-wrapper.copy-input-tall input {
    height: 44px;
    font-size: var(--font-size-base);
    padding: 0 var(--spacing-md);
    background-color: var(--bg-light);
    border-radius: var(--radius-sm);
}

.copy-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    direction: ltr;
}

.copy-input-wrapper .copy-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    cursor: pointer;
    font-family: var(--font-family);
}

.copy-input-wrapper .share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-family);
    white-space: nowrap;
    min-width: 130px;
    height: 44px;
}

.copy-input-wrapper .share-btn:hover {
    background-color: var(--primary-active);
}

.copy-input-wrapper .share-btn svg {
    flex-shrink: 0;
}

/* Schedule Box */
.schedule-box {
    margin-top: var(--spacing-lg);
}

.schedule-date {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-gray);
    margin-bottom: var(--spacing-sm);
}

/* Menu Item */
.menu-list {
    display: flex;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

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

.menu-item:hover {
    opacity: 0.7;
}

.menu-item .menu-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.menu-item .menu-icon-fa {
    width: 24px;
    font-size: 20px;
    color: var(--primary);
    text-align: center;
}

.menu-item .menu-text {
    font-size: var(--font-size-md);
    font-weight: 300;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    text-align: center;
}

.empty-state img {
    width: 150px;
    height: 150px;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.empty-state p {
    color: var(--text-gray);
    font-size: var(--font-size-sm);
}

/* No Appointments */
.no-appointments {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background-color: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-top: var(--spacing-lg);
}

.no-appointments p {
    font-size: var(--font-size-lg);
    color: var(--text-gray);
}

/* ================================
   Badges Ribbon (Horizontal Scroll)
   ================================ */
.badges-ribbon {
    margin-bottom: var(--spacing-xl);
}

.badges-ribbon-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.badges-ribbon-scroll {
    margin-left: calc(-1 * var(--spacing-md));
    margin-right: calc(-1 * var(--spacing-md));
    padding: 4px var(--spacing-md);
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.badges-ribbon-scroll::-webkit-scrollbar {
    display: none;
}

.badge-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(111, 14, 55, 0.08) 0%, rgba(111, 14, 55, 0.04) 100%);
    border: 1px solid rgba(111, 14, 55, 0.15);
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.badge-chip:hover {
    background: linear-gradient(135deg, rgba(111, 14, 55, 0.12) 0%, rgba(111, 14, 55, 0.06) 100%);
}

.badge-chip-icon {
    width: 14px;
    height: 14px;
    color: var(--primary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-chip-icon svg {
    width: 14px;
    height: 14px;
    max-width: 14px;
    max-height: 14px;
}

.badge-chip-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--primary);
}

/* ================================
   Banner Slider
   ================================ */
.banner-slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--spacing-xl);
}

.slider-track {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.slider-track .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    text-decoration: none;
}

.slider-track .slide.active {
    opacity: 1;
}

.slider-track .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-track .slide .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-track .slide .overlay-text {
    color: white;
    font-weight: 700;
    line-height: 1.8;
    font-size: var(--font-size-md);
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.slider-dots .dot.active {
    background-color: white;
    width: 24px;
    border-radius: 4px;
}

/* ================================
   Header Bell Icon
   ================================ */
.header-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--primary-pale);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.header-bell:hover {
    opacity: 0.8;
}

.header-bell svg {
    width: 24px;
    height: 24px;
}

.bell-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background-color: #EF4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================================
   Utilities
   ================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }

.hidden { display: none; }
.visible { display: block; }

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

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

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: var(--spacing-md);
}

.loading-text {
    color: var(--text-gray);
    font-size: var(--font-size-sm);
}

/* Toast/Alert */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.toast-success {
    background-color: var(--success);
    color: white;
}

.toast-error {
    background-color: var(--error);
    color: white;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Drawer/Modal */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: none;
}

.drawer-overlay.active {
    display: block;
}

.drawer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: var(--container-max);
    background-color: var(--bg-white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: var(--spacing-lg);
    z-index: 201;
    transition: transform 0.3s ease;
}

.drawer.active {
    transform: translateX(-50%) translateY(0);
}

.drawer-handle {
    width: 40px;
    height: 4px;
    background-color: var(--border-gray);
    border-radius: 2px;
    margin: 0 auto var(--spacing-lg);
}

/* ================================
   Bottom Sheet
   ================================ */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.bottom-sheet-overlay.active {
    background-color: rgba(0, 0, 0, 0.5);
}

.bottom-sheet {
    background-color: var(--bg-white);
    border-radius: 25px 25px 0 0;
    width: 100%;
    max-width: var(--container-max);
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    position: relative;
    padding: var(--spacing-md) var(--spacing-lg) var(--spacing-xl);
}

.bottom-sheet-overlay.active .bottom-sheet {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background-color: var(--border-gray);
    border-radius: 2px;
    margin: 0 auto var(--spacing-lg);
}

.bottom-sheet-close {
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: background-color 0.2s ease;
}

.bottom-sheet-close:hover {
    background-color: var(--border-light);
}

.bottom-sheet-content {
    padding-top: var(--spacing-md);
}

/* Install Guide Styles */
.install-guide {
    text-align: center;
}

.install-header {
    margin-bottom: var(--spacing-xl);
}

.install-logo {
    width: 80px;
    height: auto;
    margin-bottom: var(--spacing-md);
}

.install-header h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.install-header p {
    font-size: var(--font-size-sm);
    color: var(--text-gray);
    line-height: 1.6;
}

.install-steps {
    text-align: right;
}

.install-step {
    display: flex;
   
    margin-bottom: var(--spacing-md);
    align-items: flex-start;
}

.step-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    
    color: var(--text-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.step-content {
    flex: 1;
}

.step-content p {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: var(--spacing-sm);
}

.step-content strong {
    color: var(--primary);
    font-weight: 600;
}

.step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--bg-light);
    border-radius: var(--radius-sm);
    color: var(--primary);
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 480px) {
    :root {
        --content-max: 100%;
    }
    
    .tab-bar {
        width: 100%;
        max-width: var(--container-max);
    }
}

