/**
 * Vendor Portal V2 - Modern Styles
 * Matching PO Email Template Theme (Soft Blue)
 */

/* === VARIABLES === */
:root {
    --primary-blue: #0066cc;
    --soft-blue: #60a5fa;
    --light-blue: #dbeafe;
    --dark-blue: #1e40af;
    --grey-bg: #f4f6f9;
    --white: #ffffff;
    --text-dark: #1f2937;
    --text-grey: #6b7280;
    --border-color: #e5e7eb;
    --success-green: #10b981;
    --error-red: #ef4444;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* === RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === BASE === */
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--grey-bg);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === HEADER === */
.header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.header-logo {
    width: 90px;
    margin-bottom: 1rem;
}

.header-company {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.header-title {
    font-size: 1.2rem;
    font-weight: normal;
    opacity: 0.95;
}

.header-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* === CONTAINER === */
.container {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 100%;
}

.card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem;
}

/* === 2 COLUMN LAYOUT FOR SHIPPING === */
.shipping-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.po-info-column,
.shipping-form-column {
    min-width: 0;
}

.shipping-form-column .form-group:last-of-type {
    margin-bottom: 1rem;
}

/* === CONTENT === */
.welcome-text {
    text-align: center;
    margin-bottom: 2rem;
}

.welcome-text h2 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.welcome-text p {
    color: var(--text-grey);
    line-height: 1.8;
    text-align: justify;
}

/* === PO INFO === */
.po-info {
    background: var(--light-blue);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.po-info-row {
    display: flex;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.po-info-row:last-child {
    margin-bottom: 0;
}

.po-label {
    font-weight: 600;
    color: var(--dark-blue);
    min-width: 120px;
    flex-shrink: 0;
}

.po-value {
    color: var(--text-dark);
    flex: 1;
    word-wrap: break-word;
}

.po-value strong {
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.po-value textarea {
    width: 100%;
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    resize: none;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    outline: none;
    overflow: hidden;
    min-height: 120px;
}

/* === FORMS === */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: var(--error-red);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--soft-blue);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.form-input::placeholder {
    color: var(--text-grey);
    opacity: 0.6;
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--soft-blue) 0%, var(--primary-blue) 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
}

.btn-center {
    text-align: center;
}

/* === MESSAGES === */
.message {
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.message-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-green);
}

.message-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error-red);
}

.message-info {
    background: var(--light-blue);
    color: var(--dark-blue);
    border-left: 4px solid var(--primary-blue);
}

.message h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.message p {
    margin-bottom: 0;
}

/* === FOOTER === */
.footer {
    background: var(--dark-blue);
    color: var(--light-blue);
    padding: 2rem 1rem;
    text-align: center;
    margin-top: auto;
}

.footer-company {
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.footer-address {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.footer-contact {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-automated {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 1rem;
    line-height: 1.4;
}

/* === DIVIDER === */
.divider {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--soft-blue), transparent);
    margin: 2rem 0;
}

/* === RESPONSIVE === */
@media screen and (max-width: 600px) {
    body {
        background-color: var(--white);
    }

    .header {
        padding: 1.5rem 1rem;
    }

    .header-logo {
        width: 70px;
    }

    .header-company {
        font-size: 1.1rem;
    }

    .header-title {
        font-size: 1rem;
    }

    .header-subtitle {
        font-size: 0.9rem;
    }

    .container {
        margin: 1rem auto;
        padding: 0 0.5rem;
        max-width: 600px;
    }

    .card {
        padding: 1.5rem;
        border-radius: 0;
        box-shadow: none;
    }

    .welcome-text h2 {
        font-size: 1.4rem;
    }

    /* Single column on mobile */
    .shipping-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .po-info-row {
        flex-direction: column;
    }

    .po-label {
        margin-bottom: 0.25rem;
    }

    .po-value {
        width: 100%;
    }

    .po-value textarea {
        width: 100%;
    }

    .footer {
        padding: 1.5rem 1rem;
    }

    .footer-address {
        font-size: 0.85rem;
    }

    .footer-automated {
        font-size: 0.7rem;
    }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease;
}

/* === UTILITIES === */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}
