/* portal.css - Light restyle for Unichem Customer Portal
 * Matches live unicheminc.com: Montserrat font, #e99215 orange primary,
 * #162521 dark text/footer, #f5f5f5 light panels, #e2e6e7 borders, white bg.
 * Round 2 - light-touch only. No JS beyond what's already present.
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #162521;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e6e7;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    height: 80px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

nav a {
    color: #162521;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover,
nav a.current {
    color: #e99215;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

.contact-info a {
    color: #e99215;
    text-decoration: none;
}

.phone {
    color: #162521;
    white-space: nowrap;
}

main.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

footer {
    background-color: #162521;
    color: #ffffff;
    padding: 2rem 0;
    font-size: 0.9rem;
    text-align: right;
}

.copyright {
    opacity: 0.8;
    font-size: 0.85rem;
    text-align: right;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Login Card */
.login-card {
    background-color: #f5f5f5;
    border: 1px solid #e2e6e7;
    border-radius: 8px;
    max-width: 420px;
    margin: 4rem auto;
    padding: 2.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.login-card h1 {
    color: #162521;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.login-card p {
    color: #555;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.login-form label {
    display: block;
    text-align: left;
    margin: 1.25rem 0 0.5rem;
    font-weight: 500;
    color: #162521;
    font-size: 0.95rem;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e6e7;
    border-radius: 4px;
    font-size: 1rem;
    transition: border 0.2s;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #e99215;
    outline: none;
}

.login-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    padding: 12px 28px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #e99215;
    color: white;
}

.btn-primary:hover {
    background-color: #d17f12;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #e2e6e7;
    color: #162521;
}

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

/* Customer Page */
.customer-header {
    background-color: #f5f5f5;
    border: 1px solid #e2e6e7;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.customer-info {
    flex: 1;
    min-width: 280px;
}

.customer-info p {
    margin: 0.25rem 0;
    color: #162521;
    font-weight: 400;
}

.logoff-form {
    margin: 0;
}

#logoff_button {
    background-color: #e99215;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}

#logoff_button:hover {
    background-color: #d17f12;
}

.resco-link {
    display: inline-block;
    margin: 1.5rem 0;
    color: #e99215;
    font-weight: 500;
    text-decoration: none;
}

.resco-link:hover {
    text-decoration: underline;
}

.table-container {
    overflow-x: auto;
    border: 1px solid #e2e6e7;
    border-radius: 8px;
    background-color: white;
    margin-bottom: 2rem;
}

.products-table {
    width: 100%;
    min-width: 750px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.products-table th {
    background-color: #e99215;
    color: white;
    padding: 14px 10px;
    text-align: left;
    font-weight: 500;
    border: none;
}

.products-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e2e6e7;
    vertical-align: top;
}

.products-table tr:nth-child(even) td {
    background-color: #f8f9fa;
}

.products-table tr:hover td {
    background-color: #f0f4f8;
}

.products-table .ucc-code { width: 110px; }
.products-table .cust-code { width: 160px; }
.products-table .description { width: 280px; }

.btn-link {
    display: inline-block;
    background-color: #e99215;
    color: white;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    margin: 2px;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-link:hover {
    background-color: #d17f12;
    transform: translateY(-1px);
    color: white;
}

.none-on-file {
    color: #e74c3c;
    font-size: 0.85rem;
    font-weight: 400;
}

.pdf-note {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: 1rem;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #162521;
    margin-bottom: 1rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    nav ul {
        justify-content: center;
    }
    
    .login-card {
        margin: 2rem 1rem;
        padding: 2rem 1.5rem;
    }
    
    .customer-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .products-table th,
    .products-table td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }

    footer {
        text-align: right;
        padding: 2rem 1rem;
    }

    .copyright {
        text-align: right;
    }
}

/* Admin nav for login page - Round 4 */
.admin-nav {
    margin-top: 1rem;
    text-align: center;
}

.admin-nav a {
    color: #e99215;
    font-weight: 500;
    margin: 0 .5rem;
}
