* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.site-header {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.brand p {
    font-size: 14px;
    color: #666;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: #666;
    font-size: 14px;
}

.page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.panel.narrow {
    max-width: 500px;
    margin: 40px auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.panel-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

input::placeholder,
textarea::placeholder {
    font-style: italic;
    font-weight: 400;
    color: #888;
    font-size: 13px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.action-bar {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #4a90e2;
    color: white;
}

.btn-primary:hover {
    background: #357abd;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-ghost {
    background: transparent;
    color: #4a90e2;
    border: 1px solid #4a90e2;
}

.btn-ghost:hover {
    background: #f0f7ff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.action-card {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.action-card:hover {
    border-color: #4a90e2;
    background: #f0f7ff;
}

.action-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.action-card p {
    font-size: 14px;
    color: #666;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr:hover {
    background: #fafafa;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-draft {
    background: #e9ecef;
    color: #495057;
}

.status-sent {
    background: #cfe2ff;
    color: #084298;
}

.status-paid {
    background: #d1e7dd;
    color: #0f5132;
}

.status-overdue {
    background: #f8d7da;
    color: #842029;
}

.status-cancelled {
    background: #f8d7da;
    color: #842029;
}

.text-muted {
    color: #666;
    font-size: 14px;
}

.save-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: #28a745;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.save-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

@media print {
    .site-header,
    .actions,
    .action-bar {
        display: none;
    }
}

