/* Portal Specific Styles */

.portal-main {
    padding-top: 100px;
    min-height: 100vh;
    background-color: var(--color-black);
}

.portal-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 24px;
}

.portal-section {
    background: #1a1a1a;
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-section.hidden {
    display: none;
}

.portal-section h1 {
    margin-bottom: 12px;
    font-size: 1.75rem;
}

.portal-intro {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-family);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
}

.auth-tab:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.auth-tab.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
}

/* Auth Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-error {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 12px;
    min-height: 20px;
}

/* Form Styles */
.form-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 24px;
    padding-bottom: 0;
}

.form-section h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.form-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

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

/* Upload Area */
.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 20px;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--color-accent);
    background: rgba(26, 179, 166, 0.05);
}

.upload-icon {
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 16px;
}

.upload-area p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.upload-link {
    color: var(--color-accent);
    text-decoration: underline;
}

.upload-hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* File List */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #0a0a0a;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-name {
    flex: 1;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.file-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 4px;
    transition: color var(--transition);
}

.file-remove:hover {
    color: #ff6b6b;
}

/* Success Section */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--color-accent);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 24px;
}

.success-message h1 {
    margin-bottom: 12px;
}

.success-message p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu.hidden {
    display: none;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-family: var(--font-family);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 180px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition);
}

.user-dropdown a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
}

.user-dropdown a:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.user-dropdown a:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

.user-dropdown a:last-child:hover {
    color: #ff6b6b;
}

/* Account Success Message */
.account-success {
    color: var(--color-accent);
    font-size: 0.9rem;
    margin-top: 12px;
    min-height: 20px;
}

/* Estimate List Items */
.estimate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.estimate-item-info h4 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
}

.estimate-item-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.estimate-date {
    margin-top: 8px !important;
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.4) !important;
}

.estimate-status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

.estimate-status-badge.pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.estimate-status-badge.reviewed {
    background: rgba(26, 179, 166, 0.2);
    color: var(--color-accent);
}

/* Checkbox Styles */
.checkbox-group {
    margin-top: 24px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--color-accent);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label a {
    color: var(--color-accent);
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: var(--color-white);
}

/* Chat Interface */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #1a1a1a;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chat-header {
    padding: 20px 24px;
    background: #0a0a0a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
}

.chat-back-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 8px;
    margin: -8px;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.chat-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.chat-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.chat-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-left: auto;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-welcome {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.chat-message {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-message.sent {
    align-self: flex-end;
    background: var(--color-accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-bottom-left-radius: 4px;
}

.chat-message-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.chat-message.sent .chat-message-time {
    text-align: right;
    color: rgba(255, 255, 255, 0.7);
}

.chat-input-area {
    padding: 16px 24px;
    background: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
}

.chat-input-area input {
    flex: 1;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    color: white;
    font-family: var(--font-family);
    font-size: 1rem;
}

.chat-input-area input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.chat-input-area input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-send-btn {
    width: 48px;
    height: 48px;
    background: var(--color-accent);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.chat-send-btn:hover {
    background: #15a396;
    transform: scale(1.05);
}

.chat-send-btn:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .portal-container {
        padding: 24px 16px;
    }

    .portal-section {
        padding: 24px;
    }

    .auth-tabs {
        flex-direction: column;
    }

    .upload-area {
        padding: 30px 16px;
    }

    .chat-message {
        max-width: 85%;
    }

    .chat-header {
        padding: 16px;
    }

    .chat-input-area {
        padding: 12px 16px;
    }
}
