@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; font-size: 14px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-secondary { background: var(--muted); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.card { background: var(--card); border-radius: 8px; box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 16px; font-weight: 600; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; }
.form-control { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; background: var(--bg); }
tr:hover { background: var(--bg); }
.badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.badge-actiu { background: #dcfce7; color: #166534; }
.badge-baixa { background: #f1f5f9; color: #475569; }
.badge-pendent { background: #fef3c7; color: #92400e; }
.badge-cancelat { background: #fee2e2; color: #991b1b; }
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border-radius: 8px; padding: 20px; box-shadow: var(--shadow); }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 28px; font-weight: 700; margin-top: 4px; }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-card.danger .stat-value { color: var(--danger); }
.header { background: var(--card); border-bottom: 1px solid var(--border); padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 20px; font-weight: 700; color: var(--primary); }
.user-menu { display: flex; align-items: center; gap: 16px; }
.user-name { font-weight: 500; }
.sidebar { width: 240px; background: var(--card); border-right: 1px solid var(--border); min-height: calc(100vh - 65px); padding: 20px 0; }
.nav-item { display: block; padding: 12px 24px; color: var(--text); font-weight: 500; transition: all 0.2s; }
.nav-item:hover { background: var(--bg); text-decoration: none; }
.nav-item.active { background: #dbeafe; color: var(--primary); border-right: 3px solid var(--primary); }
.nav-section { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; padding: 16px 24px 8px; }
.main-layout { display: flex; }
.main-content { flex: 1; padding: 24px; overflow-x: auto; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.breadcrumb span { color: var(--text); }
.page-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; background: var(--card); padding: 16px; border-radius: 8px; }
.filters select, .filters input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.filters button { padding: 8px 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.tab-nav { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab-btn { padding: 10px 20px; background: none; border: none; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; }
.tab-btn.active { color: var(--primary); border-bottom: 2px solid var(--primary); margin-bottom: -2px; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.calendar-header { text-align: center; font-weight: 600; padding: 8px; background: var(--bg); border-radius: 4px; }
.calendar-day { min-height: 80px; background: var(--card); border: 1px solid var(--border); border-radius: 4px; padding: 8px; }
.calendar-day.noday { background: var(--bg); }
.calendar-day .day-num { font-weight: 600; margin-bottom: 4px; }
.calendar-event { font-size: 11px; padding: 2px 6px; background: var(--primary); color: #fff; border-radius: 3px; margin-bottom: 2px; cursor: pointer; }
.calendar-event.domain { background: var(--primary); }
.calendar-event.service { background: var(--success); }
.renewal-list { max-height: 400px; overflow-y: auto; }
.renewal-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid var(--border); }
.renewal-item:last-child { border-bottom: none; }
.renewal-name { font-weight: 500; }
.renewal-date { color: var(--muted); font-size: 13px; }
.renewal-item.overdue .renewal-date { color: var(--danger); font-weight: 600; }
.renewal-item.soon .renewal-date { color: var(--warning); font-weight: 600; }
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal-content { background: var(--card); border-radius: 8px; width: 100%; max-width: 1400px; max-height: 95vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 18px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--muted); }
.modal-body { padding: 20px; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }
.calc-section { background: var(--bg); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.calc-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 80px; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); align-items: center; }
.calc-row:last-child { border-bottom: none; font-weight: 600; }
.calc-row.highlight { background: #dcfce7; padding: 8px 12px; border-radius: 4px; }
.calc-row.header-row { background: var(--bg); font-weight: 600; color: var(--muted); text-transform: uppercase; font-size: 12px; }
.section-divider { margin-top: 16px; padding-top: 16px; border-top: 2px solid var(--border); font-weight: 600; color: var(--muted); text-transform: uppercase; font-size: 12px; margin-bottom: 8px; }
.section-title { font-weight: 600; color: var(--muted); text-transform: uppercase; font-size: 12px; margin: 20px 0 8px 0; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.hosting-table { width: 100%; }
.hosting-table th { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.hosting-table td, .hosting-table th { padding: 8px 12px; }
.hosting-table tfoot td { border-top: 2px solid var(--border); }
.hosting-table .highlight td { background: #dcfce7; font-weight: 600; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.d-flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.flex-1 { flex: 1; }
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-layout { flex-direction: column; }
    .header { flex-wrap: wrap; gap: 12px; }
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .calendar-grid { font-size: 12px; }
}