/* assets/css/style.css - Anna Peptídeos Luxury Theme */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;800;900&family=Montserrat:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
    --bg-dark: #090a0f;
    --bg-card: rgba(18, 20, 29, 0.75);
    --bg-card-solid: #12141d;
    --border-gold: rgba(212, 175, 55, 0.35);
    --border-gold-glow: rgba(255, 215, 0, 0.6);
    --gold-primary: #d4af37;
    --gold-light: #fef08a;
    --gold-gradient: linear-gradient(135deg, #d4af37 0%, #fff2a3 35%, #b8860b 70%, #ffd700 100%);
    --gold-gradient-hover: linear-gradient(135deg, #e5c158 0%, #ffffff 40%, #c9971c 70%, #ffe033 100%);
    --gold-text-gradient: linear-gradient(135deg, #ffe57f 0%, #f7d070 40%, #c4962c 70%, #ffdf73 100%);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --success: #10b981;
    --danger: #ef4444;
    --info: #3b82f6;
    --shadow-gold: 0 0 25px rgba(212, 175, 55, 0.25);
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.7);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(184, 134, 11, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(15, 17, 26, 0.95) 0%, #07080c 100%);
    background-attachment: fixed;
}

/* Canvas Particle Effect */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.65;
}

.app-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Containers */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(212, 175, 55, 0.55);
}

/* Gold Text Gradients */
.gold-text {
    background: var(--gold-text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    font-weight: 700;
}

.cinzel {
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}

/* Nav Header */
.navbar {
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(9, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    text-decoration: none;
}

.brand-seal {
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
    animation: pulseSeal 4s infinite ease-in-out;
}

@keyframes pulseSeal {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4)); }
    50% { transform: scale(1.04); filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.7)); }
}

.brand-title {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--gold-light);
    opacity: 0.85;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Language Selector Pills */
.lang-selector-group {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.lang-btn:hover {
    color: #fff;
}

.lang-btn.active {
    background: var(--gold-gradient);
    color: #0b0c10;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
}

/* Admin User Pill */
.admin-badge-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold-light);
}

.admin-badge-pill .user-avatar {
    width: 26px;
    height: 26px;
    background: var(--gold-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #090a0f;
    font-size: 0.8rem;
    font-weight: 800;
}

/* Buttons */
.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--gold-gradient);
    color: #090a0f;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
    transition: all 0.25s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg);
    transition: all 0.6s ease;
}

.btn-gold:hover {
    background: var(--gold-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(212, 175, 55, 0.55);
}

.btn-gold:hover::before {
    left: 140%;
}

.btn-outline-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-light);
    border-radius: var(--radius-sm);
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-outline-gold:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #fff;
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ffffff;
    border-color: var(--danger);
}

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

.stat-card {
    padding: 1.4rem;
    position: relative;
    overflow: hidden;
    border-left: 3px solid var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info .stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.stat-info .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Cinzel', serif;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
    font-size: 1.35rem;
}

/* Control Bar (Search, Filter, New Voucher) */
.controls-bar {
    padding: 1.2rem;
    margin-bottom: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.search-box-wrapper {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.search-box-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-primary);
    font-size: 0.95rem;
}

.search-box {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.6rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.25s ease;
}

.search-box:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.35);
}

.filter-select {
    padding: 0.75rem 1.2rem;
    background: rgba(18, 20, 29, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-sm);
    color: var(--gold-light);
    font-size: 0.88rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
}

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

.actions-cluster {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Data Table */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid rgba(212, 175, 55, 0.25);
    background: rgba(15, 17, 24, 0.85);
    box-shadow: var(--shadow-card);
}

.voucher-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 900px;
}

.voucher-table thead {
    background: rgba(212, 175, 55, 0.1);
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.voucher-table th {
    padding: 1.1rem 1rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold-light);
    font-weight: 700;
}

.voucher-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.voucher-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.06);
}

.voucher-table td {
    padding: 1rem;
    font-size: 0.88rem;
    vertical-align: middle;
}

/* Voucher Code Badge in Table */
.code-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.45);
    padding: 5px 10px;
    border-radius: 6px;
    font-family: 'Cinzel', monospace;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #fef08a;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-pill:hover {
    border-color: #ffd700;
    background: rgba(212, 175, 55, 0.18);
    transform: scale(1.02);
}

.code-pill i {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-used {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Table Action Buttons */
.table-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    margin-right: 4px;
    text-decoration: none;
}

.btn-view {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
    color: #fde047;
}
.btn-view:hover {
    background: rgba(212, 175, 55, 0.35);
    transform: scale(1.08);
}

.btn-validate-action {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.45);
    color: #6ee7b7;
}
.btn-validate-action:hover {
    background: rgba(16, 185, 129, 0.35);
    transform: scale(1.08);
}

.btn-whatsapp {
    background: rgba(37, 211, 102, 0.18);
    border-color: rgba(37, 211, 102, 0.4);
    color: #25d366;
}
.btn-whatsapp:hover {
    background: rgba(37, 211, 102, 0.35);
    transform: scale(1.08);
}

.btn-del {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}
.btn-del:hover {
    background: rgba(239, 68, 68, 0.35);
    transform: scale(1.08);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 6, 10, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #0f111a;
    border: 1px solid var(--border-gold);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2.2rem;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: #fff;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 0.45rem;
    letter-spacing: 0.5px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.92rem;
    outline: none;
    transition: all 0.25s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
    background: rgba(0, 0, 0, 0.6);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ========================================================
   VOUCHER CERTIFICATE DESIGN (Golden Luxury VIP Card)
   ======================================================== */
.voucher-card-certificate {
    background: radial-gradient(circle at 50% 30%, #1c1d29 0%, #0d0e15 100%);
    border: 2px solid #d4af37;
    border-radius: 18px;
    padding: 2.2rem;
    position: relative;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(212, 175, 55, 0.25);
    overflow: hidden;
    margin: 1.5rem 0;
}

/* Decorative Gold Filigree Border */
.voucher-card-certificate::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px dashed rgba(212, 175, 55, 0.4);
    border-radius: 12px;
    pointer-events: none;
}

.voucher-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    padding-bottom: 1.2rem;
    margin-bottom: 1.5rem;
}

.voucher-card-seal {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.6));
}

.voucher-cert-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffd700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.voucher-cert-sub {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--gold-light);
    opacity: 0.9;
}

.voucher-card-body {
    text-align: center;
    position: relative;
    z-index: 2;
}

.voucher-recipient-intro {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
}

.voucher-recipient-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.voucher-recipient-cpf {
    font-size: 0.88rem;
    color: var(--gold-light);
    font-family: 'Cinzel', monospace;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.voucher-value-box {
    display: inline-block;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--gold-primary);
    border-radius: 12px;
    padding: 0.8rem 2.5rem;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.15);
}

.voucher-value-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.voucher-value-amount {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    font-weight: 900;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.voucher-code-highlight {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Cinzel', monospace;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 1.25rem;
}

.voucher-footer-info {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 1rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.voucher-qrcode-wrapper {
    background: #fff;
    padding: 6px;
    border-radius: 6px;
    display: inline-block;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #111420;
    border: 1px solid var(--gold-primary);
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
    color: #fff;
    padding: 1rem 1.4rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.toast.toast-error {
    border-color: var(--danger);
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Login Page Specific Styling */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 2.8rem 2.2rem;
    text-align: center;
    position: relative;
    border: 1px solid var(--border-gold);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(212, 175, 55, 0.2);
}

.login-seal {
    width: 110px;
    height: 110px;
    margin: 0 auto 1.5rem auto;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.6));
    animation: pulseSeal 4s infinite ease-in-out;
}

/* Print Stylesheet */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }
    #particles-canvas, .navbar, .controls-bar, .stats-grid, .table-container, .modal-close-btn, .modal-actions, .no-print {
        display: none !important;
    }
    .modal-overlay {
        position: static !important;
        background: none !important;
        display: block !important;
        padding: 0 !important;
    }
    .modal-content {
        border: none !important;
        box-shadow: none !important;
        max-width: 100% !important;
        padding: 0 !important;
        background: transparent !important;
    }
    .voucher-card-certificate {
        background: #111 !important;
        color: #fff !important;
        border: 2px solid #d4af37 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        page-break-inside: avoid;
        margin: 0 auto !important;
        max-width: 800px !important;
    }
}
