/* Frontend Styles für Kundenportal v7 - Professionell & Neutral */

.an-portal {
    max-width: 1000px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
}

/* Header */
.an-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 30px;
}

.an-portal-branding h2 {
    margin: 0 !important;
    font-size: 28px !important;
    color: #2c3e50 !important;
    font-weight: 700 !important;
}

.an-portal-subtitle {
    margin: 5px 0 0 0 !important;
    color: #666 !important;
    font-size: 14px !important;
}

.an-portal-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.an-user-name {
    font-weight: 600;
    color: #2c3e50;
}

.an-logout-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.an-logout-btn:hover {
    background: #e9ecef;
    color: #333;
}

/* Messages */
.an-portal-message {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.an-message-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.an-portal-message p {
    color: #666 !important;
    font-size: 18px !important;
    margin: 0 !important;
}

.an-portal-error {
    background: #fef2f2;
    color: #dc2626 !important;
}

/* Statistik */
.an-portal-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.an-stat-card {
    flex: 1;
    min-width: 120px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.an-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.an-stat-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.an-stat-highlight {
    background: #2c3e50;
    border-color: #2c3e50;
}

.an-stat-highlight .an-stat-value,
.an-stat-highlight .an-stat-label {
    color: #fff;
}

.an-stat-warning {
    background: #fef3cd;
    border-color: #ffc107;
}

.an-stat-warning .an-stat-value {
    color: #856404;
}

/* Einträge */
.an-portal-entries {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.an-entry {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.an-entry-offen {
    border-left: 4px solid #ffc107;
}

.an-entry-bestaetigt {
    border-left: 4px solid #28a745;
}

/* Entry Header */
.an-entry-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.an-entry-date {
    text-align: center;
    min-width: 60px;
}

.an-date-day {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.an-date-month {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.an-entry-title-wrap {
    flex: 1;
}

.an-entry-title {
    margin: 0 0 8px 0 !important;
    font-size: 20px !important;
    color: #2c3e50 !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

.an-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.an-meta-item {
    font-size: 14px;
    color: #666;
}

.an-entry-status {
    flex-shrink: 0;
}

.an-status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

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

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

/* Entry Description */
.an-entry-description {
    padding: 25px;
    color: #555;
    line-height: 1.7;
    border-bottom: 1px solid #e9ecef;
}

.an-entry-description p {
    margin: 0 0 15px 0 !important;
    color: #555 !important;
}

.an-entry-description p:last-child {
    margin-bottom: 0 !important;
}

/* Entry Sections */
.an-entry-section {
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
}

.an-entry-section h4 {
    margin: 0 0 15px 0 !important;
    font-size: 16px !important;
    color: #2c3e50 !important;
    font-weight: 600 !important;
}

/* Tätigkeiten */
.an-taetigkeiten-table {
    width: 100%;
    border-collapse: collapse;
}

.an-taetigkeiten-table th {
    background: #2c3e50;
    color: #fff;
    text-align: left;
    padding: 12px 15px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.an-taetigkeiten-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    color: #333;
}

.an-taetigkeiten-table tr:nth-child(even) {
    background: #f8f9fa;
}

.an-taetigkeit-datum {
    width: 100px;
    font-weight: 600;
    color: #2c3e50;
}

/* Uploads */
.an-uploads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.an-upload-item {
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid #e9ecef;
    transition: all 0.2s;
}

.an-upload-item:hover {
    border-color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.an-upload-image img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.an-upload-pdf {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff3e0;
}

.an-pdf-icon {
    font-size: 32px;
}

.an-upload-name {
    padding: 10px;
    font-size: 12px;
    color: #333;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Entry Footer */
.an-entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 25px;
    background: #f8f9fa;
    gap: 30px;
}

.an-entry-pricing {
    flex: 1;
    max-width: 350px;
}

.an-pricing-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #333;
}

.an-pricing-row:last-child {
    border-bottom: none;
}

.an-pricing-rabatt {
    color: #27ae60;
}

.an-pricing-netto {
    font-weight: 600;
    border-top: 2px solid #2c3e50 !important;
    padding-top: 12px !important;
    margin-top: 5px;
}

.an-pricing-mwst {
    color: #666;
}

.an-pricing-brutto {
    font-size: 18px !important;
    font-weight: 700;
    color: #2c3e50;
}

/* Actions */
.an-entry-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.an-btn {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.an-btn-primary {
    background: #2c3e50;
    color: #fff;
}

.an-btn-primary:hover {
    background: #1a252f;
    color: #fff;
}

.an-btn-secondary {
    background: #fff;
    color: #2c3e50;
    border: 2px solid #2c3e50;
}

.an-btn-secondary:hover {
    background: #2c3e50;
    color: #fff;
}

.an-btn-full {
    width: 100%;
    text-align: center;
}

/* Confirmed Badge */
.an-entry-confirmed-badge {
    padding: 12px 25px;
    background: #d4edda;
    color: #155724;
    text-align: center;
    font-size: 14px;
}

/* Login */
.an-login-container {
    max-width: 400px;
    margin: 40px auto;
}

.an-login-box {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.an-login-header {
    padding: 30px;
    text-align: center;
    background: #2c3e50;
    color: #fff;
}

.an-login-header h2 {
    margin: 0 0 8px 0 !important;
    font-size: 24px !important;
    color: #fff !important;
}

.an-login-header p {
    margin: 0 !important;
    opacity: 0.8;
    font-size: 14px !important;
    color: #fff !important;
}

.an-login-error {
    margin: 20px 20px 0;
    padding: 12px 15px;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 8px;
    font-size: 14px;
}

.an-login-form {
    padding: 30px;
}

.an-form-group {
    margin-bottom: 20px;
}

.an-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.an-form-group input[type="text"],
.an-form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.an-form-group input:focus {
    border-color: #2c3e50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(44,62,80,0.1);
}

.an-remember label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.an-login-footer {
    padding: 20px 30px 30px;
    text-align: center;
}

.an-login-footer a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
}

.an-login-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .an-portal-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .an-entry-header {
        flex-direction: column;
    }
    
    .an-entry-date {
        display: flex;
        gap: 8px;
        align-items: baseline;
    }
    
    .an-entry-footer {
        flex-direction: column;
    }
    
    .an-entry-pricing {
        max-width: 100%;
    }
    
    .an-entry-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .an-entry-actions .an-btn {
        flex: 1;
        text-align: center;
    }
    
    .an-stat-card {
        min-width: calc(50% - 10px);
    }
}
