/* =============================================
   Unicuida Profile - Stylesheet
   ============================================= */

:root {
    --uc-green: #00b894;
    --uc-green-dark: #009d80;
    --uc-green-light: #e8f8f4;
    --uc-dark: #2d3436;
    --uc-gray: #636e72;
    --uc-gray-light: #b2bec3;
    --uc-gray-bg: #f5f6fa;
    --uc-white: #ffffff;
    --uc-red: #d63031;
    --uc-red-light: #ffeaea;
    --uc-blue: #0984e3;
    --uc-orange: #fdcb6e;
    --uc-radius: 10px;
    --uc-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--uc-gray-bg);
    color: var(--uc-dark);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--uc-green-dark); text-decoration: none; }
a:hover { color: var(--uc-green); }

/* ── SVG Icons ── */
.uc-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.uc-offer-icon .uc-icon {
    color: var(--uc-green-dark);
}

.uc-offer-meta .uc-icon {
    vertical-align: -1px;
    color: var(--uc-gray);
}

.uc-btn .uc-icon {
    vertical-align: -2px;
}

.uc-offer-quick-apply .uc-icon {
    vertical-align: -1px;
}

.uc-offer-quick-apply.applied .uc-icon {
    color: var(--uc-green-dark);
}

.uc-empty .icon .uc-icon {
    color: var(--uc-gray-light);
}

/* ── Layout ── */
.uc-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Header ── */
.uc-header {
    background: var(--uc-white);
    border-bottom: 2px solid var(--uc-green);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--uc-shadow);
}

.uc-header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--uc-dark);
    flex-shrink: 0;
}

.uc-header-logo img {
    height: 36px;
}

/* Hamburger button (hidden on desktop) */
.uc-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.uc-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--uc-dark);
    border-radius: 2px;
    transition: all 0.3s;
}

.uc-header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.uc-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.uc-nav-links a {
    font-size: 13px;
    color: var(--uc-gray);
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.uc-nav-links a:hover,
.uc-nav-links a.active {
    background: var(--uc-green-light);
    color: var(--uc-green-dark);
}

.uc-nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--uc-gray-light);
}

.uc-lang-btn {
    background: var(--uc-gray-bg);
    border: 1px solid var(--uc-gray-light);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--uc-gray);
    cursor: pointer;
}

.uc-lang-btn:hover {
    background: var(--uc-green-light);
    color: var(--uc-green-dark);
    border-color: var(--uc-green);
}

.uc-user-badge {
    font-size: 13px;
    color: var(--uc-dark);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.uc-btn-logout {
    font-size: 12px;
    color: var(--uc-gray) !important;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid var(--uc-gray-light);
    background: var(--uc-gray-bg);
    white-space: nowrap;
    transition: all 0.2s;
}

.uc-btn-logout:hover {
    background: var(--uc-red-light);
    color: var(--uc-red) !important;
    border-color: var(--uc-red);
}

/* ── Main ── */
.uc-main {
    flex: 1;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

/* ── Cards ── */
.uc-card {
    background: var(--uc-white);
    border-radius: var(--uc-radius);
    box-shadow: var(--uc-shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.uc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.uc-card-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--uc-dark);
}

.uc-card-header .badge {
    background: var(--uc-green);
    color: white;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

/* ── Offer list ── */
.uc-offer-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.uc-offer-item {
    background: var(--uc-white);
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
    cursor: pointer;
}

.uc-offer-item:hover {
    border-color: var(--uc-green);
    box-shadow: 0 2px 8px rgba(0,184,148,0.12);
}

.uc-offer-item.applied {
    border-left: 4px solid var(--uc-green);
    background: var(--uc-green-light);
}

.uc-offer-ref {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: var(--uc-gray);
    background: var(--uc-gray-bg);
    padding: 1px 7px;
    border-radius: 4px;
    margin-left: 0px;
    vertical-align: middle;
}

.uc-offer-icon {
    width: 44px;
    height: 44px;
    background: var(--uc-green-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.uc-offer-body {
    flex: 1;
    min-width: 0;
}

.uc-offer-body h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.uc-offer-body p {
    font-size: 13px;
    color: var(--uc-gray);
    margin: 0;
}

.uc-offer-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.uc-offer-meta span {
    font-size: 12px;
    color: var(--uc-gray);
    background: var(--uc-gray-bg);
    padding: 2px 8px;
    border-radius: 4px;
}

.uc-offer-dist {
    text-align: right;
    flex-shrink: 0;
}

.uc-offer-dist .km {
    font-size: 16px;
    font-weight: 700;
    color: var(--uc-green-dark);
}

.uc-offer-dist .label {
    font-size: 11px;
    color: var(--uc-gray);
}

/* ── Offer detail ── */
.uc-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.uc-detail-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--uc-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.uc-detail-field .value {
    font-size: 15px;
    color: var(--uc-dark);
}

.uc-detail-full {
    grid-column: 1 / -1;
}

.uc-detail-full .value {
    white-space: pre-line;
    line-height: 1.6;
}

/* ── Buttons ── */
.uc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.uc-btn-primary {
    background: var(--uc-green);
    color: white;
}

.uc-btn-primary:hover {
    background: var(--uc-green-dark);
    color: white;
}

.uc-btn-outline {
    background: transparent;
    border: 2px solid var(--uc-green);
    color: var(--uc-green-dark);
}

.uc-btn-outline:hover {
    background: var(--uc-green-light);
}

.uc-btn-gray {
    background: var(--uc-gray-bg);
    color: var(--uc-gray);
    border: 1px solid #ddd;
}

.uc-btn-gray:hover {
    background: #eee;
    color: var(--uc-dark);
}

.uc-btn-danger {
    background: var(--uc-red);
    color: white;
}

.uc-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.uc-btn:disabled,
.uc-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Forms ── */
.uc-form-group {
    margin-bottom: 16px;
}

.uc-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--uc-dark);
    margin-bottom: 6px;
}

.uc-input,
.uc-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: var(--uc-dark);
    background: var(--uc-white);
    transition: border-color 0.2s;
}

.uc-input:focus,
.uc-select:focus {
    outline: none;
    border-color: var(--uc-green);
    box-shadow: 0 0 0 3px rgba(0,184,148,0.15);
}

.uc-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.uc-search-row .uc-form-group {
    flex: 1;
    min-width: 140px;
    margin-bottom: 0;
}

.uc-search-row .uc-form-group.grow {
    flex: 2;
}

/* ── Alerts ── */
.uc-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.uc-alert-success {
    background: var(--uc-green-light);
    color: var(--uc-green-dark);
    border: 1px solid #b2f5ea;
}

.uc-alert-error {
    background: var(--uc-red-light);
    color: var(--uc-red);
    border: 1px solid #ffcccc;
}

.uc-alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

/* ── Login page ── */
.uc-login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--uc-green-light) 0%, var(--uc-gray-bg) 100%);
    padding: 20px;
}

.uc-login-box {
    background: var(--uc-white);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.uc-login-box .logo {
    text-align: center;
    margin-bottom: 28px;
}

.uc-login-box .logo img {
    height: 44px;
}

.uc-login-box h1 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 6px;
    color: var(--uc-dark);
}

.uc-login-box .subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--uc-gray);
    margin-bottom: 28px;
}

/* ── Modal ── */
.uc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.uc-modal-backdrop.active {
    display: flex;
}

.uc-modal {
    background: var(--uc-white);
    border-radius: 12px;
    padding: 28px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.uc-modal h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.uc-modal p {
    color: var(--uc-gray);
    margin-bottom: 20px;
}

.uc-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ── Profile grid  ── */
.uc-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

.uc-profile-field label {
    font-size: 12px;
    color: var(--uc-gray);
    display: block;
}

.uc-profile-field .val {
    font-size: 14px;
    font-weight: 500;
}

/* ── Applied badge ── */
.uc-applied-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--uc-green-light);
    color: var(--uc-green-dark);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

/* ── My applications list ── */
.uc-offer-item.uc-app-closed {
    opacity: 0.7;
    border-left: 4px solid var(--uc-red);
    background: var(--uc-red-light);
}

.uc-offer-item.uc-app-closed:hover {
    border-color: var(--uc-red);
    box-shadow: none;
    cursor: default;
}

.uc-icon-closed {
    background: var(--uc-red-light) !important;
}
.uc-icon-closed svg {
    color: var(--uc-red) !important;
}

.uc-offer-quick-apply.uc-closed-label {
    background: var(--uc-red-light);
    color: var(--uc-red);
    border-color: var(--uc-red);
}

.uc-badge-closed {
    display: inline-block;
    font-size: 11px;
    background: var(--uc-red);
    color: #fff;
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.uc-badge-active {
    display: inline-block;
    font-size: 11px;
    background: var(--uc-green);
    color: #fff;
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ── Empty state ── */
.uc-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--uc-gray);
}

.uc-empty .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.uc-empty p {
    font-size: 15px;
    max-width: 400px;
    margin: 0 auto;
}

/* ── Quick apply button in offer list ── */
.uc-offer-quick-apply {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--uc-green);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.uc-offer-quick-apply:hover {
    background: var(--uc-green-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,184,148,0.3);
}

.uc-offer-quick-apply.applied {
    background: var(--uc-green-light);
    color: var(--uc-green-dark);
    cursor: default;
    pointer-events: none;
}

/* ── Profile edit form ── */
.uc-profile-form .uc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

.uc-profile-form .uc-form-group-full {
    grid-column: 1 / -1;
}

.uc-input[readonly] {
    background: var(--uc-gray-bg);
    color: var(--uc-gray);
    cursor: not-allowed;
}

.uc-password-section {
    border-top: 1px solid #eee;
    padding-top: 16px;
    margin-top: 8px;
}

.uc-password-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--uc-green-dark);
    padding: 6px 0;
    cursor: pointer;
    transition: color 0.2s;
}

.uc-password-toggle:hover {
    color: var(--uc-green);
}

.uc-password-fields {
    margin-top: 12px;
}

.uc-password-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

.uc-field-error {
    color: var(--uc-red);
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.uc-field-error.visible {
    display: block;
}

/* ── Footer ── */
.uc-footer {
    text-align: center;
    padding: 20px;
    color: var(--uc-gray-light);
    font-size: 12px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .uc-hamburger {
        display: flex;
    }

    .uc-header-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--uc-white);
        flex-direction: column;
        padding: 16px;
        gap: 12px;
        border-bottom: 2px solid var(--uc-green);
        box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    }

    .uc-header-nav.open {
        display: flex;
    }

    .uc-nav-links {
        flex-direction: column;
        width: 100%;
        gap: 4px;
    }

    .uc-nav-links a {
        width: 100%;
        padding: 10px 14px;
        font-size: 14px;
    }

    .uc-nav-user {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--uc-gray-light);
        padding-top: 12px;
    }

    .uc-user-badge {
        max-width: none;
        text-align: center;
    }

    .uc-nav-user .uc-lang-btn,
    .uc-nav-user .uc-btn-logout {
        text-align: center;
        padding: 8px 14px;
    }
}

@media (max-width: 640px) {
    .uc-header {
        padding: 0 16px;
        height: 56px;
    }

    .uc-header-nav {
        top: 56px;
    }
    
    .uc-main {
        padding: 16px 12px 40px;
    }
    
    .uc-card {
        padding: 16px;
    }
    
    .uc-offer-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .uc-offer-dist {
        text-align: left;
    }

    .uc-offer-quick-apply {
        align-self: flex-start;
    }
    
    .uc-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .uc-profile-grid {
        grid-template-columns: 1fr;
    }

    .uc-profile-form .uc-form-row {
        grid-template-columns: 1fr;
    }

    .uc-password-row {
        grid-template-columns: 1fr;
    }
    
    .uc-search-row {
        flex-direction: column;
    }
    
    .uc-search-row .uc-form-group {
        min-width: 100%;
    }
    
    .uc-login-box {
        padding: 28px 20px;
    }
    
    .uc-modal-actions {
        flex-direction: column;
    }

    .uc-modal-actions .uc-btn {
        width: 100%;
        justify-content: center;
    }
}
