/* ============================================
   PAYMENT PORTAL - STYLESHEET
   P7 Corporate Design
   ============================================ */

/* Colors */
:root {
    --primary: #8B9680;
    --primary-hover: #7a8670;
    --primary-light: #FAF8F0;
    --secondary: #43473C;
    --border: #E8E5E0;
    --bg-light: #F5F3ED;
    --text-dark: #2C2C2C;
    --text-muted: #666;
    --success: #2e7d32;
    --warning: #f57c00;
    --danger: #d32f2f;
    --info: #0288d1;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    min-height: 600px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    padding: 3rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #FFFFFF;
}

.login-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0c16.569 0 30 13.431 30 30 0 16.569-13.431 30-30 30C13.431 60 0 46.569 0 30 0 13.431 13.431 0 30 0zm0 4C15.64 4 4 15.64 4 30s11.64 26 26 26 26-11.64 26-26S44.36 4 30 4z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.3;
}

.login-brand {
    position: relative;
    z-index: 1;
}

.login-logo {
    width: 120px;
    height: auto;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1);
}

.login-left h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 3rem;
}

.login-quote {
    margin-top: 3rem;
    padding: 1.5rem;
    border-left: 4px solid rgba(255,255,255,0.3);
    font-style: italic;
    opacity: 0.9;
}

.login-right {
    flex: 1;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.login-form-container h2 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    background: #FFFFFF;
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    height: 40px;
    width: auto;
}

.header h1 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
    display: flex;
    min-height: calc(100vh - 72px);
}

.sidebar {
    width: 240px;
    background: #FFFFFF;
    border-right: 1px solid var(--border);
    padding: 2rem 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-light);
    border-left-color: var(--primary);
}

.nav-item.active {
    background: var(--primary-light);
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.nav-icon {
    font-size: 1.25rem;
}

.main-content {
    flex: 1;
    padding: 2rem;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
}

.card-body {
    padding: 1.5rem;
}

/* ============================================
   STATISTICS
   ============================================ */

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

.stat-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.stat-amount {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
}

/* ============================================
   FORMS
   ============================================ */

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

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #FFFFFF;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139,150,128,0.1);
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
}

.filter-form {
    padding: 1.5rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

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

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #FFFFFF;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #6a7660 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139,150,128,0.3);
}

.btn-secondary {
    background: #FFFFFF;
    color: var(--text-dark);
    border: 2px solid var(--border);
}

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

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

.btn-success:hover {
    background: #1b5e20;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

/* ============================================
   TABLES
   ============================================ */

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--bg-light);
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.table tbody tr:hover {
    background: var(--primary-light);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.total-row {
    background: var(--bg-light);
    font-weight: 700;
}

.total-row td {
    border-top: 2px solid var(--border);
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-warning {
    background: #fff3e0;
    color: var(--warning);
}

.badge-info {
    background: #e3f2fd;
    color: var(--info);
}

.badge-success {
    background: #e8f5e9;
    color: var(--success);
}

.badge-danger {
    background: #ffebee;
    color: var(--danger);
}

.badge-primary {
    background: #e3f2fd;
    color: #1565c0;
}

/* ============================================
   CURRENCY BADGES
   ============================================ */

.currency-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.currency-badge.chf {
    background: #ffe5e5;
    color: #c41e3a;
}

.currency-badge.eur {
    background: #e5e5ff;
    color: #003399;
}

/* ============================================
   STAT CARD COLORS
   ============================================ */

.stat-card.stat-exported {
    border-left: 4px solid #1565c0;
}

.stat-exported .stat-amount {
    color: #1565c0;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-error {
    background: #ffebee;
    border-color: var(--danger);
    color: #b71c1c;
}

.alert-success {
    background: #e8f5e9;
    border-color: var(--success);
    color: #1b5e20;
}

.alert-warning {
    background: #fff3e0;
    border-color: var(--warning);
    color: #e65100;
}

/* ============================================
   DETAILS
   ============================================ */

.breadcrumb {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

.info-grid {
    display: grid;
    gap: 1rem;
}

.info-item label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.info-item div {
    color: var(--text-dark);
}

code {
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.875rem;
}

.mollie-status {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.mollie-status h4 {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.mollie-status p {
    margin-bottom: 0.5rem;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success);
}

small {
    font-size: 0.875rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .nav-item {
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }
    
    .nav-item.active {
        border-left: none;
        border-bottom-color: var(--primary);
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-left {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 1.25rem;
    }
    
    .main-content {
        padding: 1rem;
    }
}
