@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Work+Sans:wght@400;500;600&display=swap');

:root {
  --rf-blue: #1F5C99;
  --rf-blue-dark: #163F6B;
  --rf-ink: #171B21;
  --rf-ink-soft: #4B5563;
  --rf-paper: #F7F5F1;
  --rf-line: #E4E1DA;
  --rf-gold: #C98A2C;
  --rf-green: #1F7A52;
  --rf-green-bg: #E6F4EC;
  --rf-muted-bg: #EEECE6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Work Sans', sans-serif;
  color: var(--rf-ink);
  background: var(--rf-paper);
}

h1, h2, h3, .rf-brand {
  font-family: 'Sora', sans-serif;
}

a { color: inherit; }

.rf-container { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* Header */
.rf-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px; background: #fff; border-bottom: 1px solid var(--rf-line);
}
.rf-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 20px; }
.rf-logo {
  width: 40px; height: 40px; border-radius: 10px; background: var(--rf-blue);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 17px;
}
.rf-nav { display: flex; align-items: center; gap: 32px; }
.rf-nav a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--rf-ink); }
.rf-nav a.rf-btn-outline { padding: 10px 20px; }

/* Buttons */
.rf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 8px; font-weight: 600; font-size: 14px;
  text-decoration: none; border: none; cursor: pointer; font-family: inherit;
}
.rf-btn-primary { background: var(--rf-blue); color: #fff; }
.rf-btn-primary:hover { background: var(--rf-blue-dark); }
.rf-btn-outline { border: 1.5px solid var(--rf-blue); color: var(--rf-blue); background: transparent; }
.rf-btn-secondary { background: #fff; border: 1px solid var(--rf-line); color: var(--rf-ink); }

/* Hero */
.rf-hero { display: flex; gap: 56px; align-items: center; padding: 72px 32px; max-width: 1180px; margin: 0 auto; flex-wrap: wrap; }
.rf-hero-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 20px; }
.rf-pill { align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: #EAF1F8; color: var(--rf-blue); font-size: 13px; font-weight: 600; }
.rf-hero h1 { margin: 0; font-weight: 800; font-size: 42px; line-height: 1.15; }
.rf-hero p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--rf-ink-soft); max-width: 480px; }
.rf-hero-art { flex: 1 1 360px; height: 320px; border-radius: 16px; overflow: hidden; border: 1px solid var(--rf-line); }

/* Cards & badges */
.rf-card { background: #fff; border: 1px solid var(--rf-line); border-radius: 14px; padding: 22px; }
.rf-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.rf-badge-available { background: var(--rf-green-bg); color: var(--rf-green); }
.rf-badge-occupied { background: var(--rf-muted-bg); color: var(--rf-ink-soft); }

.rf-listing { display: flex; gap: 24px; max-width: 820px; }
.rf-listing-art { width: 220px; height: 160px; border-radius: 10px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--rf-line); }

.rf-units-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rf-unit-chip { padding: 14px; border: 1px solid var(--rf-line); border-radius: 10px; background: #fff; display: flex; flex-direction: column; gap: 8px; }

.rf-footer { padding: 36px 32px; background: var(--rf-ink); color: #C9CDD3; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.rf-footer strong { color: #fff; font-family: 'Sora', sans-serif; }

/* Login */
.rf-auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.rf-auth-card { width: 100%; max-width: 400px; padding: 36px; background: #fff; border: 1px solid var(--rf-line); border-radius: 16px; display: flex; flex-direction: column; gap: 20px; }
.rf-field { display: flex; flex-direction: column; gap: 6px; }
.rf-field label { font-size: 13px; font-weight: 600; }
.rf-field input, .rf-field select, .rf-field textarea {
  padding: 12px 14px; border: 1px solid var(--rf-line); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.rf-error { color: #B3261E; font-size: 13px; }

/* Admin layout */
.rf-admin { display: flex; min-height: 100vh; }
.rf-sidebar { width: 232px; flex-shrink: 0; background: var(--rf-ink); color: #fff; display: flex; flex-direction: column; padding: 26px 0; }
.rf-sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 22px 26px; font-weight: 700; font-size: 15px; }
.rf-sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.rf-sidebar nav a { padding: 11px 12px; border-radius: 8px; color: #AEB4BF; text-decoration: none; font-size: 14px; }
.rf-sidebar nav a.active { background: #232833; color: #fff; font-weight: 600; }
.rf-sidebar-user { margin-top: auto; padding: 16px 22px; border-top: 1px solid #2B3038; font-size: 12px; color: #8A8F99; line-height: 1.5; }
.rf-main { flex: 1; min-width: 0; padding: 30px 40px; }
.rf-page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }

.rf-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.rf-kpi { background: #fff; border: 1px solid var(--rf-line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.rf-kpi span:first-child { font-size: 13px; color: var(--rf-ink-soft); }
.rf-kpi span:last-child { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 25px; }

.rf-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--rf-line); border-radius: 12px; overflow: hidden; }
.rf-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--rf-ink-soft); padding: 10px 20px; border-bottom: 1px solid var(--rf-line); }
.rf-table td { padding: 13px 20px; font-size: 14px; border-bottom: 1px solid #F0EEE8; vertical-align: middle; }
.rf-table a.rf-link { color: var(--rf-blue); font-weight: 600; font-size: 13px; text-decoration: none; }
.rf-table span.rf-muted { color: #B9B4A6; font-weight: 600; font-size: 13px; }

/* Invoice document */
.rf-invoice-wrap { display: flex; flex-direction: column; align-items: center; padding: 12px 0 40px; }
.rf-invoice-actions { width: 820px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.rf-invoice-doc { width: 820px; background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(23,27,33,0.10); padding: 44px; display: flex; flex-direction: column; gap: 26px; }
.rf-invoice-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 22px; border-bottom: 3px solid var(--rf-blue); }
.rf-invoice-head .rf-badge-proforma { background: #FBF0DC; color: #8A5A16; }
.rf-invoice-head .rf-badge-definitive { background: #EAF1F8; color: var(--rf-blue); }
.rf-invoice-parties { width: 100%; border-collapse: collapse; }
.rf-invoice-parties td { width: 50%; vertical-align: top; padding: 0 40px 0 0; line-height: 1.7; }
.rf-invoice-parties label { font-size: 11px; font-weight: 700; color: #8A8F99; letter-spacing: 0.04em; }
.rf-invoice-head-left, .rf-invoice-head-right { display: inline-block; vertical-align: top; }
.rf-invoice-head-right { text-align: right; line-height: 1.8; }
.rf-invoice-table { width: 100%; border: 1px solid var(--rf-line); border-radius: 8px; border-collapse: collapse; overflow: hidden; }
.rf-invoice-table th { background: var(--rf-paper); text-align: left; font-size: 12px; font-weight: 700; color: var(--rf-ink-soft); padding: 11px 16px; }
.rf-invoice-table td { padding: 14px 16px; font-size: 14px; border-top: 1px solid var(--rf-line); }
.rf-invoice-total { width: 100%; overflow: hidden; }
.rf-invoice-total table { width: 260px; float: right; }
.rf-invoice-total td { padding: 6px 0; font-size: 14px; }
.rf-invoice-total .total-row td { font-weight: 700; font-size: 16px; border-top: 1px solid var(--rf-line); padding-top: 10px; }
.rf-invoice-note { font-size: 12px; color: #8A8F99; line-height: 1.6; padding-top: 8px; border-top: 1px solid #F0EEE8; }

.rf-form { display: flex; flex-direction: column; gap: 18px; max-width: 480px; }
.rf-alert { padding: 12px 16px; border-radius: 8px; background: #FBF0DC; color: #8A5A16; font-size: 13px; margin-bottom: 16px; }
