/* Trans West Brand Colors */
:root {
    --primary: #931A1D;
    --primary-light: #B24A4D;
    --secondary: #545554;
    --background: #FDFCFF;
    --surface: #FFFFFF;
    --text-primary: #1A1C1E;
    --text-secondary: #44474E;
    --error: #BA1A1A;
    --success: #4CAF50;
    --border: #E0E2EC;
    --gray-light: #F5F5F5;
    --gray-medium: #9E9E9E;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background-color: var(--primary);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-circle {
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.logo-circle img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

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

.header-actions button {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.header-actions button:hover {
    background: white;
    color: var(--primary);
}

/* Main Container */
.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 2rem;
    flex: 1;
}

.card {
    background: var(--surface);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.card h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

/* Auth pages: login, register, forgot password – comfortable width on desktop */
.card-auth {
    max-width: 560px;
    margin: 4rem auto;
}

#forgotPasswordModal .card-auth {
    margin: 2rem;
}

/* Login page — wider card, softer layout */
.page-login {
    background: linear-gradient(165deg, #f5f2f3 0%, var(--background) 42%, #eef0f4 100%);
    background-attachment: fixed;
}

.page-login .container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 1rem;
    padding-bottom: 2.5rem;
}

.page-login .card-auth-login {
    max-width: 720px;
    width: 100%;
    padding: 2.5rem 2.75rem;
    border-radius: 12px;
    box-shadow:
        0 4px 28px rgba(26, 28, 30, 0.07),
        0 1px 3px rgba(26, 28, 30, 0.05);
    border: 1px solid rgba(147, 26, 29, 0.09);
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

.page-login .card-auth-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0.95;
}

.page-login .card-auth-login h2 {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.page-login .login-lead {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.75rem;
}

.page-login .login-forgot-row {
    margin-bottom: 1.25rem;
}

.page-login .auth-link-forgot {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.page-login .auth-link-forgot:hover {
    text-decoration: underline;
}

.page-login .auth-footer-links {
    text-align: center;
    margin-top: 1.75rem;
    padding-top: 0.25rem;
}

.page-login .auth-line {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.page-login .auth-line-spaced {
    margin-top: 0.85rem;
}

.page-login .auth-link-primary {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.page-login .auth-link-primary:hover {
    text-decoration: underline;
}

.page-login .auth-link-muted {
    color: var(--text-secondary);
    text-decoration: none;
}

.page-login .auth-link-muted:hover {
    color: var(--primary);
}

.page-login #forgotPasswordModal .card-auth-login {
    max-width: 720px;
    width: calc(100% - 2rem);
    margin: 2rem;
}

@media (max-width: 768px) {
    .page-login .card-auth-login {
        padding: 1.75rem 1.5rem;
        margin: 1.25rem auto;
    }

    .page-login .card-auth-login h2 {
        font-size: 1.55rem;
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(147, 26, 29, 0.1);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

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

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

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

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

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

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

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

.btn-full {
    width: 100%;
}

/* Image Upload */
.image-upload-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.image-upload-area:hover {
    border-color: var(--primary);
    background-color: var(--gray-light);
}

.image-upload-area.dragover {
    border-color: var(--primary);
    background-color: rgba(147, 26, 29, 0.05);
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.image-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview .remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #FFEBEE;
    color: var(--error);
    border: 1px solid #FFCDD2;
}

.alert-success {
    background-color: #E8F5E9;
    color: var(--success);
    border: 1px solid #C8E6C9;
}

.alert-info {
    background-color: #E3F2FD;
    color: #1976D2;
    border: 1px solid #BBDEFB;
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--gray-light);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-links a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Profile Section */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.profile-info h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Footer */
.site-footer {
    margin-top: auto;
    padding: 1.25rem 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
}

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

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

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .container {
        padding: 0 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .site-footer {
        padding: 1rem;
    }
}

