:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --accent: #10b981;
    --danger: #ef4444;
    --border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Utilities */
.w-full { width: 100%; }
.max-w-sm { max-width: 400px; }
.text-center { text-align: center; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.flex-col { flex-direction: column; }

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

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

.hidden {
    display: none !important;
}

/* Typography */
h1, h2, h3 { font-weight: 700; margin-bottom: 5px; }
.text-sm { font-size: 0.875rem; }
.text-grey { color: var(--text-muted); }
.text-gradient {
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }

/* Cards & Glassmorphism */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.glass {
    background: rgba(30, 41, 59, 0.4);
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 15px 0;
}

/* Header */
.header {
    text-align: center;
}
.store-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.store-info img {
    max-width: 80px;
    border-radius: 50%;
}

/* Landing Page */
.branding-header {
    margin-top: 40px;
    margin-bottom: 30px;
}
.large-logo {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.brand-title {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 5px;
}
.scanner-card {
    padding: 30px 20px;
}
.scanner-container {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}
.scanner-container video {
    width: 100% !important;
    border-radius: 12px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.primary-btn {
    background-color: var(--primary);
    color: #fff;
}
.primary-btn:hover {
    background-color: #2563eb;
}
.danger-btn {
    background-color: var(--danger);
    color: #fff;
}
.danger-btn:hover {
    background-color: #dc2626;
}

/* Services */
.section-title {
    margin: 25px 0 15px;
    font-size: 1.25rem;
    color: var(--text-muted);
}
.services-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-card {
    position: relative;
    overflow: hidden;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.service-type {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.service-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}
.detail-row span:last-child {
    font-weight: 600;
}

.progress-container {
    margin-top: 15px;
}
.progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.5s ease;
}

/* Loader */
.loader-container {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    z-index: 100;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
}
.brand {
    font-weight: 700;
    color: #60a5fa;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}
.brand-link:hover {
    opacity: 0.8;
}
.footer-logo {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}
