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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.navbar-menu a:hover {
    opacity: 0.8;
}

.navbar-user {
    color: #ecf0f1;
}

.btn-logout {
    background: #e74c3c;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px 0;
    transition: 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Main content */
.main-content {
    min-height: calc(100vh - 120px);
    padding: 2rem 0;
}

/* Footer */
.footer {
    background: #34495e;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

/* Auth pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-box h1 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #2c3e50;
}

.auth-form {
    margin-bottom: 1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.btn-primary {
    background: #3498db;
}

.btn-primary:hover {
    background: #2980b9;
}

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

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Auth links */
.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.auth-links a {
    color: #3498db;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard h1 {
    margin-bottom: 2rem;
    color: #2c3e50;
}

.administration-selector {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.current-admin {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #ecf0f1;
    border-radius: 4px;
}

.no-admin-selected {
    text-align: center;
    padding: 2rem;
    background: #fff3cd;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
}

.no-admin-selected p {
    margin-bottom: 1rem;
    color: #856404;
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #3498db;
    color: white;
    border-radius: 12px;
    font-size: 0.875rem;
}

.role-badge.small {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
}

.admin-switcher {
    margin-top: 1rem;
}

.admin-switcher h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #555;
}

.admin-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}

.admin-option:hover {
    background: #e9ecef;
    border-color: #3498db;
    color: #3498db;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-card h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.dashboard-card p {
    margin-bottom: 1rem;
    color: #666;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-actions .btn {
    flex: 1;
    min-width: 140px;
    text-align: center;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.action-card {
    display: block;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.action-card h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.action-card p {
    color: #666;
}

/* Tables */
.data-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table thead {
    background: #34495e;
    color: white;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
}

.data-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.recent-users {
    margin-top: 2rem;
}

.recent-users h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Responsive design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2c3e50;
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .navbar-menu a,
    .navbar-user {
        width: 100%;
        padding: 0.75rem;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .navbar-menu a:last-child {
        border-bottom: none;
    }
    
    .dashboard-grid,
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .auth-box {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    /* Hide less important columns on mobile */
    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        display: none;
    }
}

/* Settings pages */
.settings-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.settings-page .page-header {
    margin-bottom: 3rem;
    text-align: center;
    border: none;
    display: block;
}

.settings-page .page-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.settings-page .page-header p {
    color: #666;
    font-size: 1.1rem;
}

.page-header-content {
    flex: 1;
}

.page-header h1 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.page-header p {
    color: #666;
    margin: 0;
}

.settings-grid {
    display: grid;
    gap: 3rem;
}

.settings-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.section-header h2 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-size: 1.3rem;
}

.section-header p {
    color: #666;
    margin: 0;
}

.settings-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.settings-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.settings-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}

.card-icon {
    font-size: 2rem;
    min-width: 3rem;
    text-align: center;
}

.card-content {
    flex: 1;
}

.card-content h3 {
    margin: 0 0 0.25rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.card-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.card-arrow {
    font-size: 1.5rem;
    color: #3498db;
    margin-left: 1rem;
}

/* Info boxes and tables */
.info-box {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.info-box h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.info-box p {
    color: #666;
    margin-bottom: 1.5rem;
}

.info-table table {
    width: 100%;
    border-spacing: 0;
}

.info-table td {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.info-table td:first-child {
    font-weight: 500;
    color: #2c3e50;
    width: 40%;
}

.info-table td:last-child {
    color: #666;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-admin {
    background: #fff3cd;
    color: #856404;
}

/* Forms */
.form-sections {
    display: grid;
    gap: 2rem;
}

.form-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.form-section h2 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.3rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.875rem;
}

/* Invoice form specific */
.invoice-form-page {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.invoice-lines {
    margin-top: 2rem;
}

.invoice-line {
    display: grid;
    grid-template-columns: 1fr 100px 120px 80px 120px 120px 40px;
    gap: 0.5rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.invoice-line.first-line {
    border-color: #3498db;
    background: #f0f8ff;
}

.invoice-totals {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.totals-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    max-width: 400px;
    margin-left: auto;
}

.totals-row {
    display: contents;
}

.totals-label {
    text-align: right;
    font-weight: 500;
    color: #2c3e50;
}

.totals-value {
    text-align: right;
    font-family: monospace;
    min-width: 100px;
}

.totals-value.final {
    font-weight: bold;
    font-size: 1.1rem;
    border-top: 2px solid #2c3e50;
    padding-top: 0.5rem;
}

/* Buttons */
.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

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

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

/* Data tables improvements */
.table-wrapper {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 1rem 0;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.table-header h3 {
    margin: 0;
    color: #2c3e50;
}

.table-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
}

.search-box .search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* Responsive improvements for new pages */
@media (max-width: 768px) {
    .settings-page {
        padding: 1rem;
    }
    
    .settings-cards {
        grid-template-columns: 1fr;
    }
    
    .settings-card {
        padding: 1rem;
    }
    
    .card-icon {
        font-size: 1.5rem;
        min-width: 2rem;
    }
    
    .info-table td:first-child {
        width: 50%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .invoice-line {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .invoice-line .form-group {
        margin-bottom: 0.5rem;
    }
    
    .totals-grid {
        grid-template-columns: 1fr;
        max-width: none;
    }
    
    .totals-label,
    .totals-value {
        text-align: left;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .table-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .table-filters {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .page-header {
        text-align: center;
    }
    
    .page-header .btn {
        margin-top: 1rem;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .navbar-brand a {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .dashboard-card,
    .action-card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .settings-page,
    .invoice-form-page {
        padding: 1rem;
        margin: 0.5rem;
        border-radius: 6px;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .invoice-line {
        padding: 0.5rem;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.375rem;
    }
    
    /* Stack table cells vertically on very small screens */
    .mobile-stack {
        display: block;
    }
    
    .mobile-stack thead {
        display: none;
    }
    
    .mobile-stack tbody,
    .mobile-stack tr,
    .mobile-stack td {
        display: block;
        width: 100%;
    }
    
    .mobile-stack tr {
        margin-bottom: 1rem;
        padding: 1rem;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        background: white;
    }
    
    .mobile-stack td {
        padding: 0.25rem 0;
        border: none;
        text-align: left;
    }
    
    .mobile-stack td:before {
        content: attr(data-label) ": ";
        font-weight: bold;
        color: #2c3e50;
    }
}

/* Invoice pages specific */
.invoices-page {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filters-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #e0e0e0;
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.filter-group input,
.filter-group select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.invoice-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card-invoice {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.stat-card-invoice h3 {
    margin: 0 0 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-concept {
    background: #fff3cd;
    color: #856404;
}

.status-verzonden {
    background: #d1ecf1;
    color: #0c5460;
}

.status-betaald {
    background: #d4edda;
    color: #155724;
}

.status-vervallen {
    background: #f8d7da;
    color: #721c24;
}

/* Administration users page */
.administration-users-page {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.breadcrumb {
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.users-content {
    display: grid;
    gap: 2rem;
}

.users-list-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
}

.empty-state p {
    margin: 0;
}

.users-table-container {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.users-table thead {
    background: #34495e;
    color: white;
}

.users-table th,
.users-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.users-table tbody tr:hover {
    background: #f8f9fa;
}

.role-badge-user {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.role-owner {
    background: #fff3cd;
    color: #856404;
}

.role-admin {
    background: #d1ecf1;
    color: #0c5460;
}

.role-user {
    background: #d4edda;
    color: #155724;
}

.role-viewer {
    background: #f8d7da;
    color: #721c24;
}

.invite-section {
    background: #f0f8ff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #b3d9ff;
}

.invite-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

/* Action buttons */
.btn-action {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1rem;
    transition: background 0.3s;
    text-decoration: none;
    color: inherit;
    display: inline-block;
    margin: 0 0.125rem;
}

.btn-action:hover {
    background: rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}

.btn-remove:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Invoice specific action styles */
.actions {
    white-space: nowrap;
}

.actions .btn-action {
    margin: 0 0.125rem;
    min-width: 2rem;
    text-align: center;
}

.no-action {
    color: #999;
    font-style: italic;
    font-size: 0.875rem;
}

.user-inactive {
    color: #dc3545;
    font-size: 0.75rem;
    display: block;
}

.status-accepted {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

/* Responsive improvements for invoice and user pages */
@media (max-width: 768px) {
    .invoices-page,
    .administration-users-page {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .page-header-content {
        text-align: center;
    }
    
    .page-actions {
        width: 100%;
        justify-content: center;
    }
    
    .filters-form {
        grid-template-columns: 1fr;
    }
    
    .filters-form .btn {
        margin-top: 1rem;
    }
    
    .invoice-stats {
        grid-template-columns: 1fr;
    }
    
    .users-table-container {
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    .users-table {
        font-size: 0.875rem;
    }
    
    .users-table th,
    .users-table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Hide less important columns on mobile */
    .users-table th:nth-child(5),
    .users-table td:nth-child(5),
    .users-table th:nth-child(6),
    .users-table td:nth-child(6) {
        display: none;
    }
    
    .invite-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .breadcrumb {
        text-align: center;
        word-break: break-all;
    }
}

@media (max-width: 480px) {
    .settings-page {
        padding: 0.5rem;
    }
    
    .settings-section {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .settings-card {
        padding: 0.75rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .card-content {
        text-align: center;
    }
    
    .card-arrow {
        margin-left: 0;
    }
    
    .info-box {
        padding: 1rem;
    }
    
    .info-table td {
        padding: 0.5rem 0;
        display: block;
        width: 100%;
    }
    
    .info-table td:first-child {
        width: 100%;
        font-weight: bold;
        border-bottom: none;
        padding-bottom: 0.25rem;
    }
    
    .info-table td:last-child {
        padding-top: 0.25rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #eee;
    }
    
    .invoices-page,
    .administration-users-page {
        padding: 0.75rem;
        margin: 0.25rem;
    }
    
    .users-table {
        font-size: 0.8rem;
    }
    
    .users-table th,
    .users-table td {
        padding: 0.5rem 0.25rem;
    }
    
    /* Stack users table on very small screens */
    .users-table-responsive {
        display: block;
    }
    
    .users-table-responsive thead {
        display: none;
    }
    
    .users-table-responsive tbody,
    .users-table-responsive tr,
    .users-table-responsive td {
        display: block;
        width: 100%;
    }
    
    .users-table-responsive tr {
        margin-bottom: 1rem;
        padding: 1rem;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .users-table-responsive td {
        padding: 0.25rem 0;
        border: none;
        text-align: left;
    }
    
    .users-table-responsive td:before {
        content: attr(data-label) ": ";
        font-weight: bold;
        color: #2c3e50;
        display: inline-block;
        min-width: 80px;
    }
    
    .stat-card-invoice {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .status-badge,
    .role-badge-user {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
}