/* PimPam5G Customer Portal - Main Styles */

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

:root {
    --primary-color: #E91E63;
    --primary-dark: #C2185B;
    --primary-light: #F8BBD9;
    --success-color: #4CAF50;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-primary: #333;
    --text-secondary: #666;
    --white: #ffffff;
}

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

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #E91E63 0%, #C2185B 100%);
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    position: relative;
}

.language-switcher-top {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 10px;
}

.auth-logo a {
    display: inline-block;
    margin-bottom: 8px;
}

.auth-logo img {
    height: 45px;
    width: auto;
    max-width: 180px;
}

/* Mobile: smaller logo */
@media (max-width: 480px) {
    .auth-logo img {
        height: 38px;
        max-width: 150px;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .language-switcher-top {
        top: 10px;
        right: 10px;
    }
}

.auth-logo h1 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 800;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: var(--text-primary);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

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

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

/* Loading State */
.auth-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin-bottom: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Social Login Buttons */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-social:hover {
    background: var(--light-bg);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-social:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-google { border-color: #4285F4; }
.btn-google:hover { background: #f0f7ff; }

.btn-facebook { border-color: #1877F2; }
.btn-facebook:hover { background: #e7f3ff; }

.btn-apple { border-color: #000; }
.btn-apple:hover { background: #f5f5f5; }

/* Divider */
.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    background: var(--white);
    padding: 0 16px;
    position: relative;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(233,30,99,0.15);
}

.form-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
}

.btn-block {
    width: 100%;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* Language Switcher */
.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    font-size: 0.95rem;
}

.language-current:hover {
    border-color: var(--primary-color);
}

.language-flag {
    font-size: 16px;
}

.language-arrow {
    font-size: 10px;
    color: var(--text-secondary);
}

.language-options {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 150px;
    display: none;
    z-index: 1000;
}

.language-options.show {
    display: block;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.language-option:hover {
    background: var(--light-bg);
}

.language-option.active {
    background: #e7f3ff;
    color: var(--primary-color);
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(450px);
    transition: transform 0.3s ease;
    border-left: 4px solid var(--info-color);
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left-color: var(--success-color);
}

.notification-error {
    border-left-color: var(--danger-color);
}

.notification-warning {
    border-left-color: var(--warning-color);
}

.notification-info {
    border-left-color: var(--info-color);
}

.notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.notification-success .notification-icon {
    background: var(--success-color);
    color: var(--white);
}

.notification-error .notification-icon {
    background: var(--danger-color);
    color: var(--white);
}

.notification-warning .notification-icon {
    background: var(--warning-color);
    color: #333;
}

.notification-info .notification-icon {
    background: var(--info-color);
    color: var(--white);
}

.notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.notification-close:hover {
    background: rgba(0,0,0,0.05);
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-dialog {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-dialog {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-secondary);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Success/Error Modal Styles (Mobile-First) */
.modal-success, .modal-error {
    max-width: 90%;
    width: 400px;
    text-align: center;
    padding: 2rem 1.5rem;
}

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem auto;
    font-weight: bold;
}

.modal-icon-success {
    background: #d4edda;
    color: #28a745;
}

.modal-icon-error {
    background: #f8d7da;
    color: #dc3545;
}

.modal-success .modal-header,
.modal-error .modal-header {
    border-bottom: none;
    padding: 0 0 1rem 0;
}

.modal-success .modal-header h3,
.modal-error .modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-success .modal-body,
.modal-error .modal-body {
    padding: 0 0 1.5rem 0;
}

.modal-success .modal-body p,
.modal-error .modal-body p {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.modal-success .modal-footer,
.modal-error .modal-footer {
    border-top: none;
    padding: 0;
    justify-content: center;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .modal-success, .modal-error {
        max-width: 95%;
        margin: 1rem;
    }

    .modal-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .modal-success .modal-header h3,
    .modal-error .modal-header h3 {
        font-size: 1.25rem;
    }
}

/* Document Viewer Styles */
.documents-initial {
    text-align: center;
    padding: 40px 20px;
}

.documents-initial .btn {
    margin-bottom: 16px;
}

.documents-hint {
    color: var(--text-secondary);
    font-size: 14px;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.document-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s;
}

.document-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.document-thumbnail {
    width: 100%;
    height: 150px;
    background: var(--light-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 12px;
}

.document-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.document-thumbnail-icon {
    font-size: 48px;
    color: var(--text-secondary);
}

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

.document-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.document-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.document-actions .btn {
    flex: 1;
    padding: 8px;
    font-size: 13px;
}

/* Document Upload Form */
.upload-section {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.upload-section h4 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.upload-form-group {
    margin-bottom: 16px;
}

.upload-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.upload-form-group select,
.upload-form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    font-size: 14px;
}

.upload-form-group input[type="file"] {
    cursor: pointer;
}

.upload-form-group select:focus,
.upload-form-group input[type="file"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.upload-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Pending Documents List */
.pending-documents {
    margin-top: 24px;
}

.pending-documents h4 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.pending-document-card {
    background: var(--white);
    border: 2px solid var(--warning-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.pending-document-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.pending-document-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.pending-document-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.pending-status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

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

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

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

.pending-document-files {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.pending-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.pending-file-item:last-child {
    margin-bottom: 0;
}

.file-icon {
    font-size: 16px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
}

/* Button Variants */
.btn-secondary {
    background: var(--light-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: #e2e6ea;
    border-color: var(--text-secondary);
}

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

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

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
    }

    .auth-logo h1 {
        font-size: 28px;
    }

    .auth-card h2 {
        font-size: 20px;
    }

    .notification-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .notification {
        transform: translateY(-100px);
    }

    .notification.show {
        transform: translateY(0);
    }

    .modal-dialog {
        width: 95%;
        margin: 20px;
    }

    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .document-actions {
        flex-direction: column;
    }

    .pending-document-header {
        flex-direction: column;
        gap: 8px;
    }
}