/* index.css - Estilos Generales y Login */
:root { 
    --primary: #1a73e8; 
    --bg: #f0f2f5; 
    --success: #34a853; 
    --purple: #8e44ad; 
    --orange: #fd7e14; 
}

body { 
    font-family: 'Segoe UI', system-ui, sans-serif; 
    background: var(--bg); 
    padding: 20px; 
    display: flex; 
    justify-content: center; 
    color: #333; 
    margin: 0; 
}

/* --- Pantalla de Login --- */
body.login-body { 
    align-items: center; 
    height: 100vh; 
    background: #e0e4e8; 
    padding: 0;
}
.login-box { 
    background: white; 
    padding: 40px; 
    border-radius: 12px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); 
    text-align: center; 
    width: 100%; 
    max-width: 350px; 
}
.login-box h2 { margin: 0 0 20px 0; color: #333; font-size: 1.5rem; }
.login-box input[type="password"] { 
    width: 100%; padding: 14px; margin-bottom: 15px; border: 2px solid #ddd; 
    border-radius: 8px; box-sizing: border-box; font-size: 1.1rem; text-align: center; 
    letter-spacing: 2px; outline: none; transition: 0.3s; 
}
.login-box input[type="password"]:focus { border-color: var(--primary); }
.login-box button { 
    background: var(--primary); color: white; border: none; padding: 14px; 
    border-radius: 8px; cursor: pointer; width: 100%; font-size: 1.1rem; 
    font-weight: bold; transition: 0.2s; 
}
.login-box button:hover { background: #1557b0; }
.error-msg { 
    color: #d32f2f; background: #ffebee; padding: 10px; border-radius: 6px; 
    margin-bottom: 15px; font-size: 0.9rem; font-weight: bold; 
}

/* --- App Principal --- */
.app-wrapper { width: 100%; max-width: 850px; }

.header-bar { text-align: right; padding-bottom: 15px; }
.btn-nav { background: #333; color: white; padding: 8px 15px; border-radius: 6px; text-decoration: none; font-weight: bold; font-size: 0.9rem; display: inline-block; transition: 0.2s;}
.btn-nav:hover { background: #000; }
.btn-logout { background: #c5221f; margin-left: 10px; }
.btn-logout:hover { background: #a50e0e; }

.card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.08); margin-bottom: 20px; }
h1 { margin: 0 0 20px 0; color: var(--primary); font-size: 1.6rem; text-align: center; }
label { font-weight: 600; color: #555; margin-top: 15px; display: block; font-size: 0.9rem; }
input[type="text"], input[type="number"], input[type="tel"], input[type="email"], input[type="date"], select, textarea { 
    width: 100%; padding: 12px; margin-top: 5px; border: 1px solid #ddd; border-radius: 8px; box-sizing: border-box; font-size: 1rem; font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; }

button.btn-search { background: var(--primary); color: white; border: none; padding: 14px; border-radius: 8px; margin-top: 25px; cursor: pointer; width: 100%; font-size: 1rem; font-weight: bold; display: flex; justify-content: center; gap: 10px; transition: 0.2s; }
button.btn-search:hover { background: #1557b0; }

.spinner { border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top: 3px solid white; width: 20px; height: 20px; animation: spin 1s linear infinite; display: none; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.msg { padding: 15px; border-radius: 8px; text-align: center; margin-bottom: 20px; font-weight: 500; }
.msg.error { background: #fce8e6; color: #c5221f; border: 1px solid #fad2cf; }
.msg.success { background: #e6f4ea; color: #137333; border: 1px solid #ceead6; }

.place-item { display: flex; flex-wrap: wrap; gap: 20px; border-bottom: 1px solid #eee; padding-bottom: 20px; margin-bottom: 20px; align-items: center; }
.place-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.place-info { flex-grow: 1; min-width: 250px; }
.place-name { font-size: 1.15rem; font-weight: 700; margin: 0 0 4px 0; }
.place-category { color: var(--primary); font-size: 0.85rem; font-weight: 600; margin: 0 0 6px 0; }
.place-address { color: #666; font-size: 0.9rem; margin-bottom: 8px; }
.place-rating { color: #fbbc04; font-weight: bold; font-size: 0.9rem; }
.place-reviews-count { color: #777; font-weight: normal; font-size: 0.85rem; margin-left: 5px; }

.place-action { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }

.btn-row { display: flex; gap: 6px; }
.btn-action { flex: 1; padding: 10px 5px; border-radius: 6px; font-weight: 600; font-size: 0.85rem; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; text-decoration: none; transition: 0.2s; color: white; }

.btn-visit { background: var(--success); } .btn-visit:hover { background: #2d8e47; }
.btn-copy { background: #e8f0fe; color: var(--primary); } .btn-copy:hover { background: #d2e3fc; } .btn-copy.copied { background: #333; color: white; }
.btn-qr { background: var(--purple); } .btn-qr:hover { background: #703688; }
.btn-cartel { background: var(--orange); } .btn-cartel:hover { background: #e06c0b; }
.btn-save { background: #0288d1; } .btn-save:hover { background: #0277bd; }

/* --- Ventanas Modales --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: none; justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(3px); }
.modal-content { background: white; padding: 30px; border-radius: 15px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); position: relative; animation: slideIn 0.3s ease; }
.modal-content.qr-modal { text-align: center; max-width: 90%; width: 350px; }
.modal-content.save-modal { width: 450px; max-width: 95%; text-align: left; }
.modal-content img { width: 200px; height: 200px; margin: 20px 0; border: 1px solid #eee; padding: 10px; border-radius: 8px; }
.close-modal { position: absolute; top: 10px; right: 15px; font-size: 24px; cursor: pointer; color: #aaa; background: none; border: none; }
.close-modal:hover { color: #333; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Elementos Modal Guardar */
.form-group-row { display: flex; gap: 10px; margin-top: 10px; }
.form-group-row > div { flex: 1; }
.form-group-row label, .save-modal label { margin-top: 0; font-size: 0.85rem; }
.save-modal input, .save-modal select, .save-modal textarea { margin-top: 2px; padding: 8px; }
.btn-submit-save { background: var(--success); color: white; border: none; padding: 12px; border-radius: 8px; font-weight: bold; cursor: pointer; margin-top: 15px; width: 100%; font-size: 1rem; transition: 0.2s;}
.btn-submit-save:hover { background: #2d8e47; }

@media (max-width: 700px) { .place-item { flex-direction: column; align-items: flex-start; } .place-action { max-width: 100%; } .btn-row { flex-wrap: wrap; } .btn-action { min-width: 48%; } }