/* Danny Attali Admin Dashboard - Styles */

:root {
    --primary: #c9a86c;
    --primary-dark: #b8944d;
    --black: #0c0c0d;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray: #666666;
    --gray-dark: #333333;
    --success: #28a745;
    --warning: #ffc107;
    --error: #dc3545;
    --info: #17a2b8;
    --font-heading: 'Bodoni Moda', serif;
    --font-body: 'Merriweather', serif;
    --sidebar-width: 260px;
}

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

body {
    font-family: var(--font-body);
    background: var(--gray-light);
    color: var(--black);
    line-height: 1.6;
    min-height: 100vh;
}

/* Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--black) 0%, #1a1a1a 100%);
    padding: 1rem;
}

.login-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    height: 60px;
    margin-bottom: 1.5rem;
}

.login-card h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--black);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Password Toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--primary);
}

/* Admin Dashboard Layout */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--black);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    height: 40px;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-item:hover {
    color: var(--white);
    background: rgba(255,255,255,0.05);
}

.nav-item.active {
    color: var(--primary);
    background: rgba(201, 168, 108, 0.1);
    border-left: 3px solid var(--primary);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.main-header h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
}

#userInfo {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 1.3rem;
    color: var(--white);
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--black);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.card h2 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
}

.card h2 i {
    margin-right: 0.5rem;
    color: var(--primary);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.filters select,
.filters input {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
}

.filter-date-shortcuts {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-date-shortcuts .date-shortcut {
    white-space: nowrap;
}

.filter-date-shortcuts .date-shortcut.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--gray);
    white-space: nowrap;
}

.filter-group label i {
    color: var(--primary);
}

.bookings-date-info {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.bookings-date-info:empty {
    display: none;
}

.bookings-date-info i {
    font-size: 1.1rem;
}

/* Loyalty Styles */
.search-input-group {
    display: flex;
    gap: 0.5rem;
}

.search-input-group input {
    flex: 1;
}

.loyalty-search-result {
    margin-top: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #faf8f5 0%, #f5f0e8 100%);
    border-radius: 12px;
    border: 2px solid var(--primary);
}

.loyalty-search-result.hidden {
    display: none;
}

.loyalty-card-found {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.loyalty-card-info h3 {
    margin: 0 0 0.3rem;
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.loyalty-card-info p {
    margin: 0;
    color: var(--gray);
    font-size: 0.9rem;
}

.loyalty-card-info .card-number {
    font-family: monospace;
    color: var(--primary);
    font-weight: 600;
}

.loyalty-points-display {
    text-align: center;
    padding: 1rem 1.5rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.loyalty-points-display .points-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.loyalty-points-display .points-label {
    font-size: 0.8rem;
    color: var(--gray);
    text-transform: uppercase;
}

.loyalty-add-points-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.loyalty-add-points-form .form-group {
    margin-bottom: 0;
}

.points-preview {
    padding: 0.5rem 1rem;
    background: var(--success);
    color: var(--white);
    border-radius: 6px;
    font-weight: 600;
}

.loyalty-card-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.loyalty-card-badge.active {
    background: #d4edda;
    color: #155724;
}

.loyalty-card-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.9rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: var(--gray-light);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background: #faf8f5;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-confirmed {
    background: #d4edda;
    color: #155724;
}

.badge-pending {
    background: #fff3cd;
    color: #856404;
}

.badge-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.badge-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-paid {
    background: #d4edda;
    color: #155724;
}

.badge-current {
    background: #c9a86c;
    color: #fff;
}

.badge-past {
    background: #e0e0e0;
    color: #666;
}

/* Closure periods */
.card-description {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.row-past {
    opacity: 0.5;
}

.closure-preview {
    margin: 1rem 0;
}

.preview-box {
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 1rem;
    color: #004085;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-box i {
    font-size: 1.2rem;
}

/* Upcoming Bookings */
.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.upcoming-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.upcoming-date {
    text-align: center;
    min-width: 60px;
}

.upcoming-day {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

.upcoming-month {
    font-size: 0.75rem;
    color: var(--gray);
    text-transform: uppercase;
}

.upcoming-info {
    flex: 1;
}

.upcoming-service {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.upcoming-customer {
    font-size: 0.85rem;
    color: var(--gray);
}

.upcoming-time {
    font-weight: 600;
    color: var(--primary);
}

/* Schedule Grid */
.schedule-grid {
    display: grid;
    gap: 0.75rem;
}

.schedule-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-light);
    border-radius: 8px;
}

.schedule-day {
    font-weight: 600;
}

.schedule-times {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.schedule-times input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100px;
}

.schedule-closed {
    color: var(--error);
    font-style: italic;
}

/* Forms */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

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

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

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

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

.btn-danger:hover {
    background: #c82333;
}

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

.btn-full {
    width: 100%;
}

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

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn.edit {
    background: #e3f2fd;
    color: #1976d2;
}

.action-btn.delete {
    background: #ffebee;
    color: #c62828;
}

.action-btn:hover {
    transform: scale(1.1);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 0;
    border: none;
    padding: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.modal-close:hover {
    color: var(--black);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Hidden */
.hidden {
    display: none !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: 45px;
    height: 45px;
    background: var(--black);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 200;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding-top: 4.5rem;
    }

    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .main-header h1 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
        padding-top: 4rem;
    }

    .main-header h1 {
        font-size: 1.3rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-icon i {
        font-size: 1rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .card {
        padding: 1rem;
        border-radius: 8px;
    }

    .card h2 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

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

    .filters {
        flex-direction: column;
        width: 100%;
    }

    .filters select,
    .filters input {
        width: 100%;
    }

    .filter-date-shortcuts {
        width: 100%;
        justify-content: center;
    }

    .filter-date-shortcuts .date-shortcut {
        flex: 1;
        min-width: 0;
        padding: 0.5rem 0.3rem;
        font-size: 0.75rem;
    }

    .filter-date-shortcuts .date-shortcut i {
        display: none;
    }

    .filter-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group label {
        margin-bottom: 0.3rem;
    }

    .bookings-date-info {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }

    .schedule-row {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .schedule-times {
        justify-content: center;
    }

    table {
        font-size: 0.8rem;
    }

    th, td {
        padding: 0.4rem;
    }

    .upcoming-item {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.8rem;
    }

    .upcoming-date {
        min-width: auto;
    }

    .upcoming-day {
        font-size: 1.2rem;
    }

    .upcoming-service {
        font-size: 0.9rem;
    }

    .upcoming-customer {
        font-size: 0.8rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 0.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.8rem;
        padding-top: 3.5rem;
    }

    .main-header h1 {
        font-size: 1.1rem;
    }

    #userInfo {
        font-size: 0.8rem;
    }

    .stat-card {
        padding: 0.8rem;
    }

    .stat-icon {
        width: 35px;
        height: 35px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .card {
        padding: 0.8rem;
    }

    .card h2 {
        font-size: 0.95rem;
    }

    table {
        font-size: 0.75rem;
    }

    th, td {
        padding: 0.3rem;
    }

    .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }

    .action-btn {
        width: 28px;
        height: 28px;
    }

    .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }

    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        top: 0.8rem;
        left: 0.8rem;
    }

    .mobile-menu-toggle span {
        width: 18px;
    }
}

/* ========================================
   LOYALTY TABS & QR DISPLAY
======================================== */

.loyalty-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--white);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.loyalty-tab {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.loyalty-tab:hover {
    background: var(--gray-light);
}

.loyalty-tab.active {
    background: var(--primary);
    color: var(--white);
}

.loyalty-tab-content {
    display: none;
}

.loyalty-tab-content.active {
    display: block;
}

/* QR Display Fullscreen Style */
.qr-display-fullscreen {
    background: linear-gradient(135deg, var(--black) 0%, #1a1a1a 100%);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    color: var(--white);
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.qr-display-header {
    margin-bottom: 1.5rem;
}

.qr-display-logo {
    height: 40px;
    margin-bottom: 1rem;
}

.qr-display-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.qr-display-header p {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
}

.qr-display-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-code-large {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 0 10px 40px rgba(201, 168, 108, 0.3);
}

.qr-code-large canvas {
    display: block;
}

.qr-display-points {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.points-badge {
    background: linear-gradient(135deg, var(--primary) 0%, #b8944d 100%);
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 5px 20px rgba(201, 168, 108, 0.4);
}

.points-text {
    margin-top: 0.5rem;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

.qr-display-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
}

.qr-stat {
    text-align: center;
}

.qr-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.qr-stat-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qr-display-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-qr-fullscreen,
.btn-qr-print,
.btn-qr-refresh {
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.btn-qr-fullscreen {
    background: var(--primary);
    color: var(--white);
    border: none;
}

.btn-qr-fullscreen:hover {
    background: #b8944d;
    transform: translateY(-2px);
}

.btn-qr-print {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-qr-print:hover {
    background: rgba(255,255,255,0.2);
}

.btn-qr-refresh {
    background: transparent;
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-qr-refresh:hover {
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}

.qr-display-footer {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

.qr-display-footer strong {
    color: var(--primary);
}

/* Mini stats for cards tab */
.loyalty-stats-mini {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card.mini {
    padding: 1rem;
}

.stat-card.mini .stat-value {
    font-size: 1.5rem;
}

/* Fullscreen mode */
.qr-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--black);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.qr-fullscreen-content {
    text-align: center;
    color: var(--white);
}

.qr-fullscreen-content .qr-code-large {
    padding: 2rem;
}

.qr-fullscreen-content .qr-code-large canvas {
    width: 350px !important;
    height: 350px !important;
}

.qr-fullscreen-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.qr-fullscreen-close:hover {
    background: rgba(255,255,255,0.2);
}

@media (max-width: 768px) {
    .loyalty-tabs {
        flex-wrap: wrap;
    }

    .loyalty-tab {
        flex: 1 1 calc(33% - 0.5rem);
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .qr-display-fullscreen {
        padding: 1.5rem;
        min-height: auto;
    }

    .qr-display-header h2 {
        font-size: 1.4rem;
    }

    .qr-code-large {
        padding: 1rem;
    }

    .points-badge {
        font-size: 1.2rem;
        padding: 0.6rem 1.5rem;
    }

    .qr-display-stats {
        gap: 1.5rem;
        padding: 1rem;
    }

    .qr-stat-value {
        font-size: 1.5rem;
    }

    .qr-display-actions {
        flex-wrap: wrap;
    }

    .btn-qr-fullscreen,
    .btn-qr-print,
    .btn-qr-refresh {
        flex: 1 1 calc(50% - 0.5rem);
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .qr-display-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .qr-display-actions {
        flex-direction: column;
    }

    .btn-qr-fullscreen,
    .btn-qr-print,
    .btn-qr-refresh {
        width: 100%;
    }
}

/* ============ FULLSCREEN QR OVERLAY ============ */
.qr-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0c0c0d 0%, #1a1a1a 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.qr-fullscreen-content {
    text-align: center;
    color: #fff;
    max-width: 600px;
    width: 90%;
    padding: 2rem;
}

.qr-fullscreen-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.qr-fullscreen-close:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.qr-fullscreen-logo {
    height: 60px;
    margin-bottom: 1.5rem;
}

.qr-fullscreen-content h1 {
    font-family: 'Bodoni Moda', serif;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.qr-fullscreen-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 2rem;
}

.qr-code-fullscreen {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    display: inline-block;
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(201, 168, 108, 0.3);
}

.qr-fullscreen-points {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.points-badge-large {
    background: linear-gradient(135deg, var(--primary) 0%, #b8944d 100%);
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(201, 168, 108, 0.4);
}

.qr-fullscreen-points span:last-child {
    color: rgba(255,255,255,0.6);
    font-size: 1.1rem;
}

.qr-fullscreen-footer {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

.qr-fullscreen-footer strong {
    color: var(--primary);
}

/* Mobile fullscreen adjustments */
@media (max-width: 768px) {
    .qr-fullscreen-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .qr-fullscreen-content h1 {
        font-size: 1.8rem;
    }

    .qr-fullscreen-subtitle {
        font-size: 1rem;
    }

    .qr-code-fullscreen {
        padding: 1rem;
    }

    .points-badge-large {
        font-size: 1.5rem;
        padding: 0.8rem 2rem;
    }
}

/* ============ GOOGLE CALENDAR ============ */

.google-calendar-status {
    min-height: 100px;
}

.google-status {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f8f9fa;
}

.google-status.connected {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 1px solid #c8e6c9;
}

.google-status.configured {
    background: linear-gradient(135deg, #e3f2fd 0%, #e8eaf6 100%);
    border: 1px solid #bbdefb;
}

.google-status.not-configured {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
}

.google-status.error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
}

.google-status-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.google-status-info {
    flex: 1;
}

.google-status-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: var(--black);
}

.google-status-info p {
    margin: 0.25rem 0;
    color: var(--gray);
    font-size: 0.9rem;
}

.google-status-info code {
    background: rgba(0,0,0,0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.google-status-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.google-status-actions .btn {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .google-status {
        flex-direction: column;
        text-align: center;
    }

    .google-status-actions {
        width: 100%;
        flex-direction: row;
        justify-content: center;
    }
}
