/* Authentication Styles */
.auth-container {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 1rem 2rem;
    background-color: var(--background-alt);
}

.auth-box {
    width: 100%;
    max-width: 500px;
    background-color: var(--background);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    font-family: 'Fira Sans';
}

.signup-box {
    max-width: 600px;
}

.signup-button-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.auth-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-family: 'Fira Sans';
}

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

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

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.half {
    flex: 1;
}

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

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    font-family: 'Fira Sans';
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.form-checkbox {
    margin-right: 0.5rem;
}

.form-checkbox-label {
    font-size: 0.9rem;
}

.form-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary);
    color: var(--background);
    border: none;
    border-radius: 0.375rem;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.form-submit:hover {
    background-color: var(--primary-dark);
}

.auth-links {
    text-align: center;
    font-size: 0.9rem;
}

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

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

.google-auth-section {
    margin-bottom: 1rem;
}

.google-auth-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: white;
    color: #374151;
    font-family: 'Fira Sans';
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.google-auth-btn:hover {
    border-color: #d1d5db;
    background-color: #f9fafb;
}

.google-auth-btn:active {
    transform: translateY(1px);
}

.google-icon {
    flex-shrink: 0;
}

.form-errors {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.4rem;
}

.flash-message {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

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

.flash-message.danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.flash-message.warning {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    background-color: rgb(207 127 0 / 20%);
}

.password-field-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.password-toggle-btn:hover {
    color: #333;
}

.password-toggle-btn:focus {
    outline: none;
}

.form-input.error-input {
    border-color: #e74c3c;
}

/* Profile Styles */
.profile-container {
    padding: 8rem 0 5rem;
    background-color: var(--background-alt);
    min-height: calc(100vh - 180px);
}

.profile-content {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    margin-bottom: 2rem;
}

.profile-title {
    font-size: 2rem;
    color: var(--text-dark);
}

.profile-card {
    background-color: var(--background);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.info-section {
    margin-bottom: 2rem;
}

.info-item {
    margin-bottom: 1rem;
    display: flex;
}

.info-label {
    font-weight: 600;
    width: 150px;
}

.profile-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: #f5f5f5;
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-section p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

/* Add these styles to your existing auth.css file */

/* Count badge styles */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background-color: #00A499;
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    padding: 0 0.375rem;
}

/* Saved properties preview */
.saved-properties-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.property-preview-card {
    background-color: #f9f9f9;
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    border: 1px solid #e5e5e5;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.preview-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #333;
}

.preview-address {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.75rem;
}

.auth-footer a {
    color: #00A499;
    text-decoration: none;
}

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

/* Mobile Styles */
@media (max-width: 768px) {
    .auth-box {
        padding: 1.5rem;
    }
    
    .profile-card {
        padding: 1.5rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .info-item {
        flex-direction: column;
    }
    
    .info-label {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .profile-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn {
        display: block;
        text-align: center;
    }

    .saved-properties-preview {
        grid-template-columns: 1fr;
    }
}

/* Document Management Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.count-badge {
    background-color: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Storage Quota Styles */
.storage-quota {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    border: 1px solid var(--border);
}

.quota-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.quota-used {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.quota-used.warning {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.quota-used.danger {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.quota-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

/* Upload Form Styles */
.upload-form {
    background-color: #f8f9fa;
    border: 2px dashed var(--border);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: border-color 0.2s ease;
}

.upload-form.active {
    border-color: var(--primary);
    background-color: rgba(16, 185, 129, 0.05);
}

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

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

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.9rem;
    background-color: white;
    transition: border-color 0.2s ease;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* File Input Styles */
.file-input-container {
    position: relative;
}

#file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-input-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 2px dashed var(--border);
    border-radius: 0.375rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-input-display:hover {
    border-color: var(--primary);
    background-color: rgba(16, 185, 129, 0.02);
}

.file-input-display.has-file {
    border-color: var(--primary);
    background-color: rgba(16, 185, 129, 0.05);
    border-style: solid;
}

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

.file-placeholder.has-file {
    color: var(--text-dark);
    font-weight: 500;
}

.file-requirements {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

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

/* Upload Progress Styles */
.upload-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #059669 100%);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Documents Container Styles */
.documents-container {
    margin-top: 2rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.empty-state p {
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Documents List Styles */
.documents-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.document-card {
    background-color: white;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
}

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

.document-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.document-icon {
    font-size: 2rem;
    color: var(--primary);
    flex-shrink: 0;
}

.document-icon.pdf { color: #e74c3c; }
.document-icon.image { color: #3498db; }
.document-icon.word { color: #2980b9; }

.document-info {
    flex: 1;
    min-width: 0;
}

.document-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    word-break: break-word;
    line-height: 1.4;
}

.document-type {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: capitalize;
    background-color: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.document-type.voucher { background-color: #dbeafe; color: #1e40af; }
.document-type.income { background-color: #d1fae5; color: #065f46; }
.document-type.other { background-color: #f3f4f6; color: #374151; }

.document-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.document-size {
    font-weight: 500;
}

.document-date {
    font-size: 0.8rem;
}

.document-description {
    font-size: 0.875rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-style: italic;
}

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

button#upload-document-btn {
    border: none;
}

.btn-small {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 0.25rem;
}

.btn-danger {
    background-color: #cf7f00;
    border: solid 1px #cf7f00;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

/* Loading and Error States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted);
}

.loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

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

.error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.success-message {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* Mobile Document Management Styles */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .section-header h2 {
        text-align: center;
    }
    
    .documents-list {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .document-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .document-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .upload-form {
        padding: 1rem;
    }
    
    .document-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}