/* Astro Loyalty Card - Modern Space Theme */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;600;700&display=swap');

/* === GLOBAL RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-cyan: #00FFFF;
    --primary-blue: #0080FF;
    --dark-bg: #0a0a1f;
    --card-bg: rgba(10, 10, 31, 0.85);
    --accent-gold: #FFD700;
    --success-green: #00FF88;
    --error-red: #FF3366;
    --text-primary: #ffffff;
    --text-secondary: #a0a0c0;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: url('astro_bg.jpg') no-repeat center center fixed;
    background-size: cover;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Space animation overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(10, 10, 31, 0.6) 100%);
    pointer-events: none;
    z-index: 0;
}

/* === NAVIGATION === */
.top-nav {
    background: linear-gradient(135deg, rgba(10, 10, 31, 0.95), rgba(0, 50, 100, 0.95));
    backdrop-filter: blur(15px);
    border-bottom: 3px solid var(--primary-cyan);
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.4);
    /* تثبيت الشريط في الأعلى */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-logo {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 0 10px var(--primary-cyan));
}

.nav-content h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3em;
    font-weight: 900;
    color: var(--primary-cyan);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    letter-spacing: 1px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 8px;
    margin-right: auto;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95em;
    white-space: nowrap;
    background: rgba(0, 255, 255, 0.05);
}

.nav-links a:hover {
    border-color: var(--primary-cyan);
    background: rgba(0, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

.nav-links a.active {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    border-color: var(--primary-cyan);
}

.logout-link {
    color: var(--error-red) !important;
    border-color: var(--error-red) !important;
}

.logout-link:hover {
    background: rgba(255, 51, 102, 0.1) !important;
}

/* === MAIN CONTAINER === */
.main-container {
    max-width: 1400px;
    /* تم التعديل: زيادة الهامش العلوي لـ 100px (للوضع العام) */
    margin: 100px auto 40px auto;
    padding: 0 30px;
    position: relative;
    z-index: 1;
}

/* === LOGIN PAGE === */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    border: 3px solid var(--primary-cyan);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.4),
                inset 0 0 30px rgba(0, 255, 255, 0.1);
    backdrop-filter: blur(15px);
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px var(--primary-cyan));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.system-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5em;
    font-weight: 900;
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
    line-height: 1.2;
}

.highlight {
    color: var(--primary-cyan);
    font-size: 0.8em;
}

.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-cyan);
    font-weight: 600;
    font-size: 1.1em;
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary-cyan);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1.1em;
    font-family: 'Rajdhani', sans-serif;
    transition: all 0.3s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    background: rgba(0, 0, 0, 0.7);
}

/* === BUTTONS === */
.btn-login,
.btn-primary,
.btn-search,
.btn-reward,
.btn-danger {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login,
.btn-primary,
.btn-search {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.btn-login:hover,
.btn-primary:hover,
.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
}

.btn-reward {
    background: linear-gradient(135deg, var(--accent-gold), #FFA500);
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.btn-reward:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-red), #CC0033);
    color: white;
    padding: 8px 15px;
    font-size: 0.9em;
}

.btn-small {
    width: auto;
    padding: 8px 15px;
    font-size: 0.9em;
}

/* === SEARCH SECTION === */
.search-section {
    background: var(--card-bg);
    border: 3px solid var(--primary-cyan);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}

.search-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2em;
    color: var(--primary-cyan);
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    gap: 15px;
}

.input-group input {
    flex: 1;
}

.input-group button {
    width: auto;
    min-width: 150px;
}

/* === PROFILE CONTAINER === */
.profile-container {
    background: var(--card-bg);
    border: 3px solid var(--primary-cyan);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}

.profile-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--primary-cyan);
}

.customer-info h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5em;
    color: var(--primary-cyan);
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

.phone-number {
    font-size: 1.3em;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 3em;
    font-weight: 900;
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.stat-label {
    display: block;
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* === CARD PROGRESS === */
.card-progress {
    text-align: center;
    padding: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    margin-bottom: 30px;
}

.card-progress h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8em;
    color: var(--primary-cyan);
    margin-bottom: 30px;
}

.visits-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
}

.visit-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px dashed var(--primary-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.visit-circle.filled {
    background: var(--primary-cyan);
    border: 3px solid var(--primary-cyan);
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.reward-circle {
    border: 3px solid var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(255, 215, 0, 0.1);
}

.reward-circle.ready {
    background: var(--accent-gold);
    color: var(--dark-bg);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    animation: glow 1.5s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 1); }
}

.arrow-icon {
    font-size: 2em;
    color: var(--primary-cyan);
}

.reward-icon {
    font-size: 1.5em;
}

/* === REWARD READY === */
.reward-ready {
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border: 3px solid var(--accent-gold);
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.reward-message {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8em;
    color: var(--accent-gold);
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.reward-details {
    font-size: 1.3em;
    color: var(--text-primary);
    margin-bottom: 20px;
}

/* === HISTORY SECTION === */
.history-section {
    margin-top: 40px;
}

.history-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6em;
    color: var(--primary-cyan);
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

.history-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

thead {
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.3), rgba(0, 255, 255, 0.3));
}

th {
    padding: 15px;
    text-align: right;
    font-weight: 700;
    color: var(--primary-cyan);
    font-size: 1.1em;
    border-bottom: 2px solid var(--primary-cyan);
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    color: var(--text-primary);
}

tbody tr:hover {
    background: rgba(0, 255, 255, 0.1);
}

.reward-row {
    background: rgba(255, 215, 0, 0.1);
}

/* === DASHBOARD === */
.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5em;
    color: var(--primary-cyan);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

.user-role {
    font-size: 1.3em;
    color: var(--text-secondary);
    margin-top: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    border: 3px solid var(--primary-cyan);
    border-radius: 15px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.5);
}

.stat-card.highlight {
    border-color: var(--accent-gold);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.stat-icon {
    font-size: 3em;
    filter: drop-shadow(0 0 10px var(--primary-cyan));
}

.stat-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5em;
    color: var(--primary-cyan);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 1.1em;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.dashboard-section {
    background: var(--card-bg);
    border: 3px solid var(--primary-cyan);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.dashboard-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6em;
    color: var(--primary-cyan);
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

.activity-list,
.top-customers-list {
    max-height: 500px;
    overflow-y: auto;
}

.activity-item,
.customer-item {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--primary-cyan);
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-info strong,
.customer-details strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.1em;
    margin-bottom: 5px;
}

.phone,
.visits {
    color: var(--text-secondary);
    font-size: 0.95em;
}

.activity-meta {
    text-align: left;
}

.time,
.date {
    display: block;
    color: var(--primary-cyan);
    font-size: 0.9em;
}

.rank {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5em;
    font-weight: 900;
    color: var(--accent-gold);
    margin-right: 15px;
}

.rewards-badge {
    background: var(--accent-gold);
    color: var(--dark-bg);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
}

/* === ADMIN SECTION === */
.admin-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.admin-section {
    background: var(--card-bg);
    border: 3px solid var(--primary-cyan);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.admin-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8em;
    color: var(--primary-cyan);
    margin-bottom: 25px;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

.admin-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
}

.role-badge {
    padding: 5px 15px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9em;
}

.role-badge.admin {
    background: var(--accent-gold);
    color: var(--dark-bg);
}

.role-badge.employee {
    background: var(--primary-cyan);
    color: var(--dark-bg);
}

.visits-badge {
    padding: 5px 12px;
    border-radius: 12px;
    background: rgba(0, 255, 255, 0.2);
    color: var(--primary-cyan);
    font-weight: 700;
}

.visits-badge.ready {
    background: var(--accent-gold);
    color: var(--dark-bg);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* === ALERTS === */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-weight: 600;
    border: 2px solid;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--success-green);
    color: var(--success-green);
}

.alert-error {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--error-red);
    color: var(--error-red);
}

/* === QUICK ACTIONS === */
.quick-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.action-button {
    background: var(--card-bg);
    border: 3px solid var(--primary-cyan);
    border-radius: 15px;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.2em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.action-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    border-color: var(--accent-gold);
}

.action-icon {
    font-size: 1.5em;
}

/* === FORM SECTION === */
.form-section {
    background: var(--card-bg);
    border: 3px solid var(--primary-cyan);
    border-radius: 20px;
    padding: 40px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}

.form-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2em;
    color: var(--primary-cyan);
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

.modern-form .form-group {
    margin-bottom: 25px;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 25px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary-cyan);
}

/* === MENU TOGGLE === */
.menu-toggle {
    display: none; /* Hidden by default on desktop */
    width: 30px;
    height: 25px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    margin-left: auto; /* Push it to the right */
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-cyan);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* === RESPONSIVE === */

/* Tablet devices (768px to 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .main-container {
        margin-top: 120px;
        padding: 0 20px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .nav-content h1 {
        font-size: 1.3em;
    }

    .login-card {
        padding: 40px 30px;
    }
}

/* Mobile devices (max 768px) */
@media (max-width: 768px) {
    .main-container {
        /* Adjust top margin for the fixed nav bar */
        margin-top: 80px;
        padding: 0 15px;
    }

    .nav-content {
        padding: 12px 15px;
        /* Keep it as a row, space out items */
        justify-content: space-between;
        gap: 10px;
    }

    .nav-content h1 {
        font-size: 1em;
        flex: 1;
        min-width: 0;
    }

    .menu-toggle {
        display: flex; /* Show the hamburger */
        order: 3;
    }

    .nav-links {
        display: none; /* Hide links by default */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px; /* Position below the nav bar */
        left: 0;
        right: 0;
        background: linear-gradient(135deg, rgba(10, 10, 31, 0.98), rgba(0, 50, 100, 0.98));
        backdrop-filter: blur(20px);
        border-bottom: 3px solid var(--primary-cyan);
        padding: 10px 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        display: flex; /* Show links when menu is active */
    }

    .nav-links a {
        padding: 15px 30px;
        text-align: center;
        width: 100%;
        border-radius: 0;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
    }

    .nav-links a:hover,
    .nav-links a.active {
        border-left-color: var(--primary-cyan);
        border-right-color: var(--primary-cyan);
    }

    .nav-logo {
        width: 40px;
        height: 40px;
    }

    .stats {
        flex-direction: column;
        gap: 20px;
    }

    .visits-display {
        flex-wrap: wrap;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group button {
        width: 100%;
    }

    .quick-actions {
        flex-direction: column;
    }

    .admin-form {
        grid-template-columns: 1fr;
    }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-cyan);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

.no-data {
    text-align: center;
    color: var(--text-secondary);
    padding: 30px;
    font-size: 1.1em;
}

.current-user {
    color: var(--success-green);
    font-weight: 600;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 255, 255, 0.3);
}

.login-footer p {
    color: var(--text-secondary);
    font-size: 0.95em;
}

/* === CUSTOMER PORTAL STYLES === */
.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: rgba(0, 255, 255, 0.3);
}

.divider span {
    background: var(--card-bg);
    padding: 0 15px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.btn-register {
    display: block;
    width: 100%;
    padding: 15px;
    border: 2px solid var(--primary-cyan);
    border-radius: 10px;
    background: transparent;
    color: var(--primary-cyan);
    font-size: 1.2em;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-register:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

.staff-link {
    display: block;
    margin-top: 15px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s;
}

.staff-link:hover {
    color: var(--primary-cyan);
}

/* Customer Card Container */
.customer-card-container {
    max-width: 900px;
    margin: 0 auto;
}

.card-header-section {
    background: var(--card-bg);
    border: 3px solid var(--primary-cyan);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}

.customer-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
    flex-shrink: 0;
}

.customer-main-info h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2em;
    color: var(--primary-cyan);
    margin: 0 0 10px 0;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

.customer-phone {
    font-size: 1.3em;
    color: var(--text-secondary);
    margin: 5px 0;
}

.customer-email {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin: 5px 0;
}

.card-stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: var(--card-bg);
    border: 3px solid var(--primary-cyan);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.5);
}

.stat-box .stat-icon {
    font-size: 2.5em;
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5em;
    font-weight: 900;
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    line-height: 1;
}

.stat-text {
    color: var(--text-secondary);
    font-size: 1em;
    margin-top: 5px;
}

.loyalty-card-visual {
    background: var(--card-bg);
    border: 3px solid var(--primary-cyan);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}

.loyalty-card-visual h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2em;
    color: var(--primary-cyan);
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

.card-progress-section {
    text-align: center;
}

.progress-text {
    font-size: 1.5em;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 600;
}

.progress-number {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-cyan);
    font-size: 1.2em;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

.visits-display-large {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.visit-circle-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px dashed var(--primary-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.visit-circle-large.filled {
    background: var(--primary-cyan);
    border: 4px solid var(--primary-cyan);
    color: var(--dark-bg);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.8);
    animation: pulse 2s ease-in-out infinite;
}

.visit-circle-large.reward-circle {
    border: 4px solid var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(255, 215, 0, 0.1);
}

.visit-circle-large.reward-circle.ready {
    background: var(--accent-gold);
    color: var(--dark-bg);
    box-shadow: 0 0 35px rgba(255, 215, 0, 0.8);
    animation: glow 1.5s ease-in-out infinite;
}

.arrow-icon-large {
    font-size: 3em;
    color: var(--primary-cyan);
}

.reward-icon-large {
    font-size: 2em;
}

.customer-reward-ready {
    position: relative;
    margin-top: 40px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border: 4px solid var(--accent-gold);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
    overflow: hidden;
}

.reward-glow-effect {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.customer-reward-ready h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5em;
    color: var(--accent-gold);
    margin: 0 0 15px 0;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    position: relative;
    z-index: 1;
}

.reward-ready-text {
    font-size: 1.5em;
    color: var(--text-primary);
    margin: 10px 0;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.reward-details-text {
    font-size: 1.8em;
    color: var(--accent-gold);
    margin: 15px 0;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.reward-instruction {
    font-size: 1.2em;
    color: var(--text-secondary);
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.progress-message {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--primary-cyan);
    border-radius: 10px;
}

.progress-message p {
    font-size: 1.3em;
    color: var(--text-primary);
    margin: 0;
}

.progress-message strong {
    color: var(--accent-gold);
    font-size: 1.2em;
}

.history-card {
    background: var(--card-bg);
    border: 3px solid var(--primary-cyan);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}

.history-card.rewards-card {
    border-color: var(--accent-gold);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
}

.history-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8em;
    color: var(--primary-cyan);
    margin-bottom: 25px;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

.history-card.rewards-card h3 {
    color: var(--accent-gold);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 4px solid var(--primary-cyan);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: translateX(-5px);
}

.history-item.reward-item {
    border-left-color: var(--accent-gold);
    background: rgba(255, 215, 0, 0.05);
}

.history-date {
    text-align: center;
    padding: 15px;
    background: rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    min-width: 70px;
}

.date-day {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 2em;
    font-weight: 900;
    color: var(--primary-cyan);
    line-height: 1;
}

.date-month {
    display: block;
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 5px;
}

.history-details {
    flex: 1;
}

.history-time {
    font-size: 1.1em;
    color: var(--text-primary);
    margin: 0 0 5px 0;
}

.history-staff {
    font-size: 0.95em;
    color: var(--text-secondary);
    margin: 0;
}

.reward-type {
    font-size: 1.2em;
    color: var(--accent-gold);
    font-weight: 600;
    margin: 0 0 5px 0;
}

.history-icon {
    font-size: 2em;
    color: var(--success-green);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 136, 0.2);
    border-radius: 50%;
}

.reward-icon-small {
    color: var(--accent-gold);
    background: rgba(255, 215, 0, 0.2);
}

.empty-state {
    text-align: center;
    padding: 60px 40px;
    background: var(--card-bg);
    border: 3px solid var(--primary-cyan);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}

.empty-icon {
    font-size: 5em;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.empty-state h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2em;
    color: var(--primary-cyan);
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

.empty-state p {
    font-size: 1.2em;
    color: var(--text-secondary);
}

.customer-footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    background: var(--card-bg);
    border-top: 2px solid var(--primary-cyan);
}

.customer-footer p {
    color: var(--text-primary);
    font-size: 1.1em;
    margin: 5px 0;
}

.footer-small {
    font-size: 0.9em !important;
    color: var(--text-secondary) !important;
}

/* Responsive for customer portal */
@media (max-width: 768px) {
    .card-header-section {
        flex-direction: column;
        text-align: center;
        padding: 25px;
    }

    .customer-main-info h1 {
        font-size: 1.8em;
    }

    .visits-display-large {
        gap: 10px;
    }

    .visit-circle-large {
        width: 60px;
        height: 60px;
        font-size: 1.5em;
    }

    .history-item {
        flex-wrap: wrap;
        gap: 10px;
    }

    .customer-reward-ready h3 {
        font-size: 2em;
    }

    .profile-container,
    .search-section,
    .admin-section,
    .form-section {
        padding: 20px;
    }

    table {
        font-size: 0.9em;
    }

    th, td {
        padding: 10px 8px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }

    .btn-edit,
    .btn-delete,
    .btn-small {
        width: 100%;
        padding: 8px 12px;
        font-size: 0.9em;
    }
}

/* Small mobile devices (max 480px) */
@media (max-width: 480px) {
    .system-title {
        font-size: 2em;
    }

    .login-card {
        padding: 30px 20px;
    }

    .stat-value {
        font-size: 2.5em;
    }

    .card-stats-section {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .visit-circle {
        width: 50px;
        height: 50px;
        font-size: 1.2em;
    }

    input[type="text"],
    input[type="password"],
    input[type="email"],
    select {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}