:root {
    --apple-blue: #0071e3;
    --apple-gray: #f5f5f7;
    --apple-text: #1d1d1f;
    --apple-subtext: #86868b;
    --success-green: #34c759;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    background-color: var(--apple-gray);
    color: var(--apple-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app-container { max-width: 900px; margin: 0 auto; padding: 40px 20px; }

.hero { text-align: center; margin-bottom: 60px; }
.badge { 
    background: #e8e8ed; color: var(--apple-blue); 
    padding: 6px 12px; border-radius: 20px; 
    font-size: 12px; font-weight: 700; text-transform: uppercase;
}
.hero h1 { font-size: 48px; font-weight: 700; margin: 15px 0; letter-spacing: -1px; }
.subtitle { font-size: 21px; color: var(--apple-subtext); max-width: 600px; margin: 0 auto; }

.photo-gallery { display: flex; gap: 20px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.photo-card img { 
    width: 100%; 
    height: 200px; 
    border-radius: 15px; 
    display: block; 
    object-fit: cover; 
    
    object-position: center top; 
}
.photo-card img { width: 100%; border-radius: 15px; display: block; height: 200px; object-fit: cover; }
.photo-label { padding: 10px 0 5px; font-weight: 600; font-size: 14px; color: var(--apple-subtext); }

.price-tag { 
    text-align: center; margin-bottom: 20px; font-size: 20px; color: var(--apple-subtext);
}
.price-tag span { color: var(--apple-text); font-weight: 700; font-size: 28px; }

.card { background: white; border-radius: 28px; padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.04); }
.card-header { text-align: center; margin-bottom: 30px; }
.number-grid { 
    display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); 
    gap: 12px; max-height: 450px; overflow-y: auto; padding: 10px;
}

.number-grid::-webkit-scrollbar { width: 6px; }
.number-grid::-webkit-scrollbar-thumb { background: #d2d2d7; border-radius: 10px; }

.num-btn {
    border: 1px solid #d2d2d7; background: white; padding: 15px 0;
    font-size: 16px; font-weight: 600; border-radius: 12px; cursor: pointer; transition: 0.2s;
}
.num-btn:hover { border-color: var(--apple-blue); background: #f0f7ff; }
.num-btn.selecionado { background: var(--apple-blue); color: white; border-color: var(--apple-blue); }
.num-btn.vendido { background: #f5f5f7; color: #d2d2d7; cursor: not-allowed; text-decoration: line-through; }

.payment-panel { 
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 95%; max-width: 520px; background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 30px; padding: 30px; border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15); z-index: 1000;
}
.payment-content { position: relative; text-align: center; }
.close-panel-btn {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #8e8e93;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    font-weight: 300;
    transition: color 0.2s ease;
}
.close-panel-btn:hover {
    color: #1d1d1f;
}
.check-icon { 
    width: 40px; height: 40px; background: var(--success-green); 
    color: white; border-radius: 50%; display: flex; 
    align-items: center; justify-content: center; margin: 0 auto 15px; font-weight: bold;
}
.payment-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}
input {
    width: 100%;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    background: #fbfbfd;
}
.admin-link-btn {
    margin-top: 14px;
    border: none;
    background: transparent;
    color: var(--apple-subtext);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}
.admin-card {
    position: relative;
    width: min(720px, 100%);
    max-height: 85vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}
.admin-subtitle {
    margin-top: 8px;
    color: var(--apple-subtext);
}
.admin-form {
    margin-top: 18px;
}
.admin-error {
    margin-top: 14px;
    color: #c93434;
    font-size: 14px;
    font-weight: 600;
}
.admin-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}
.admin-item {
    border: 1px solid #e5e5ea;
    border-radius: 18px;
    padding: 16px;
    background: #fbfbfd;
}
.admin-item-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.admin-item p {
    margin-top: 6px;
    font-size: 14px;
}
.admin-empty {
    color: var(--apple-subtext);
}
.admin-page {
    max-width: 1100px;
}
.admin-hero {
    margin-bottom: 28px;
}
.admin-page-card {
    max-width: none;
}
.admin-toolbar {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.admin-actions {
    display: flex;
    gap: 10px;
}
.btn-secondary {
    background: #424245;
}
textarea { 
    width: 100%; height: 80px; margin: 15px 0; border-radius: 12px;
    border: 1px solid #d2d2d7; padding: 10px; font-family: monospace; font-size: 13px;
    background: #fbfbfd; resize: none;
}
.pix-result {
    margin-top: 18px;
}
.pix-countdown {
    margin-top: 10px;
    color: #b54708;
    font-size: 14px;
    font-weight: 700;
}
.qr-code {
    width: 220px;
    max-width: 100%;
    margin: 16px auto 8px;
    display: block;
    border-radius: 16px;
    background: white;
    padding: 10px;
    border: 1px solid #e1e1e6;
}
.ticket-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--apple-blue);
    text-decoration: none;
    font-weight: 600;
}
.payment-success {
    min-height: 380px;
    background: linear-gradient(180deg, #effff5 0%, #dcfce8 48%, #c8f5d8 100%);
    border: 1px solid #b8ebc8;
    border-radius: 28px;
    padding: 40px 24px 28px;
    color: #15613a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}
.success-label {
    display: inline-flex;
    align-self: center;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(34, 167, 87, 0.12);
    color: #1a8c49;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.success-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: linear-gradient(180deg, #2ec866 0%, #19984a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 700;
    box-shadow: 0 12px 25px rgba(36, 167, 89, 0.25);
}
.payment-success h3 {
    font-size: 32px;
    line-height: 1.1;
    margin-bottom: 12px;
}
.payment-success p {
    font-size: 17px;
    line-height: 1.5;
}
.success-note {
    margin-top: 10px;
    color: #2f6c47;
}
.btn-success {
    margin-top: 24px;
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 16px 20px;
    background: #22a757;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 26px rgba(34, 167, 87, 0.22);
}
.btn-success:hover {
    transform: translateY(-1px);
}
.btn-primary { 
    background: var(--apple-blue); color: white; border: none; 
    padding: 15px 30px; border-radius: 15px; font-size: 17px; 
    font-weight: 600; cursor: pointer; width: 100%; transition: 0.3s;
}
.btn-primary:hover { opacity: 0.9; transform: scale(0.98); }

.hidden { display: none !important; }

.info-section { margin-top: 30px; }
.info-card { background: #e8e8ed; padding: 25px; border-radius: 22px; color: #424245; font-size: 15px; }
.footer { text-align: center; margin-top: 50px; color: var(--apple-subtext); font-size: 13px; }

@media (max-width: 600px) {
    .hero h1 { font-size: 32px; }
    .photo-card { width: calc(50% - 10px); }
    .photo-card img { height: 160px; }
}
