/* Marina Bella House - Styles */

:root {
    --primary: #1a5276;
    --primary-light: #2980b9;
    --accent: #e67e22;
    --bg: #f5f7fa;
    --white: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #dce1e6;
    --success: #27ae60;
    --error: #e74c3c;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.header p {
    opacity: 0.85;
    font-size: 1rem;
}

/* Container */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.container-wide {
    max-width: 960px;
}

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

.card h2 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg);
}

.card h3 {
    color: var(--primary);
    font-size: 1.05rem;
    margin-bottom: 0.8rem;
}

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    color: var(--text);
}

.form-group label .required {
    color: var(--error);
}

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

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

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: var(--white);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.1);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
}

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

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

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

.btn-accent:hover {
    background: #d35400;
}

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

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

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

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

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Guest block */
.guest-block {
    background: var(--bg);
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    border: 1.5px solid var(--border);
}

.guest-block.primary {
    border-color: var(--primary-light);
    background: #eaf2f8;
}

.guest-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.guest-block-header h3 {
    margin: 0;
    font-size: 1rem;
}

.btn-remove-guest {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.2rem 0.5rem;
}

.btn-remove-guest:hover {
    background: rgba(231,76,60,0.1);
    border-radius: 4px;
}

.btn-add-guest {
    background: none;
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 0.8rem;
    width: 100%;
    cursor: pointer;
    color: var(--primary-light);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-add-guest:hover {
    border-color: var(--primary-light);
    background: #eaf2f8;
}

/* Thank you page */
.success-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.keybox-code {
    background: var(--primary);
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-align: center;
    padding: 1.2rem;
    border-radius: 12px;
    margin: 1rem 0;
}

.instructions-box {
    background: #fef9e7;
    border: 1.5px solid #f9e79f;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin: 1rem 0;
}

.instructions-box h3 {
    color: #7d6608;
    margin-bottom: 0.5rem;
}

/* Admin */
.admin-header {
    background: var(--primary);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 1.2rem;
}

.admin-nav a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
    opacity: 0.85;
    font-size: 0.9rem;
}

.admin-nav a:hover {
    opacity: 1;
}

.admin-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Table */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 0.7rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

tr:hover {
    background: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-new {
    background: #d4efdf;
    color: #1e8449;
}

.badge-count {
    background: #d6eaf8;
    color: #1a5276;
}

/* Alert */
.alert {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: #d4efdf;
    color: #1e8449;
    border: 1px solid #a9dfbf;
}

.alert-error {
    background: #fadbd8;
    color: #922b21;
    border: 1px solid #f1948a;
}

.alert-info {
    background: #d6eaf8;
    color: #1a5276;
    border: 1px solid #aed6f1;
}

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

.stat-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.2rem;
    text-align: center;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.2rem;
}

/* Detail */
.detail-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.3rem 1rem;
    font-size: 0.95rem;
}

.detail-grid dt {
    font-weight: 500;
    color: var(--text-light);
}

.detail-grid dd {
    margin: 0;
}

/* Login */
.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.login-box {
    width: 100%;
    max-width: 360px;
    padding: 0 1rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Print */
@media print {
    .no-print { display: none !important; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* Responsive */
@media (max-width: 600px) {
    .header h1 { font-size: 1.4rem; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .container { padding: 1rem 0.8rem; }
    .keybox-code { font-size: 2rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .admin-header { flex-direction: column; gap: 0.5rem; }
    .admin-nav a { margin-left: 0; margin-right: 1rem; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-grid dt { margin-top: 0.5rem; }
}
