/* CHTek Customer Portal Frontend Styles */

:root {
    --chtek-primary: #003366;
    --chtek-accent: #FF9900;
    --chtek-success: #00CC00;
    --chtek-text: #333333;
    --chtek-light-bg: #f5f5f5;
    --chtek-border: #ddd;
}

/* Login Container */
.chtek-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--chtek-primary) 0%, #004d99 100%);
    padding: 20px;
}

.chtek-login-box {
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.chtek-login-box h2 {
    color: var(--chtek-primary);
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 24px;
}

/* Portal Container */
.chtek-portal {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chtek-header {
    background: linear-gradient(135deg, var(--chtek-primary) 0%, #004d99 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chtek-header h1 {
    margin: 0;
    font-size: 28px;
}

.chtek-user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.chtek-user-info span {
    font-size: 14px;
}

.chtek-logout-btn {
    background-color: var(--chtek-accent);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.chtek-logout-btn:hover {
    background-color: #e68900;
}

/* Tabs */
.chtek-tabs {
    display: flex;
    border-bottom: 2px solid var(--chtek-border);
    background-color: var(--chtek-light-bg);
}

.chtek-tab-button {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--chtek-text);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.chtek-tab-button:hover {
    background-color: white;
}

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

/* Tab Content */
.chtek-tab-content {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s;
}

.chtek-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.chtek-tab-content h2 {
    color: var(--chtek-primary);
    margin-top: 0;
    border-bottom: 2px solid var(--chtek-accent);
    padding-bottom: 10px;
}

/* Forms */
.chtek-form {
    max-width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--chtek-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--chtek-border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--chtek-accent);
    box-shadow: 0 0 5px rgba(255, 153, 0, 0.3);
}

/* Buttons */
.chtek-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.chtek-btn-primary {
    background-color: var(--chtek-accent);
    color: white;
    width: 100%;
}

.chtek-btn-primary:hover {
    background-color: #e68900;
}

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

.chtek-btn:hover {
    background-color: #002244;
}

/* Tables */
.chtek-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.chtek-table thead {
    background-color: var(--chtek-primary);
    color: white;
}

.chtek-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.chtek-table td {
    padding: 12px;
    border-bottom: 1px solid var(--chtek-border);
}

.chtek-table tbody tr:hover {
    background-color: var(--chtek-light-bg);
}

/* Status Badges */
.status-draft,
.status-sent,
.status-viewed,
.status-partial,
.status-paid {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-draft {
    background-color: rgba(100, 100, 100, 0.1);
    color: #666;
}

.status-sent {
    background-color: rgba(0, 102, 204, 0.1);
    color: #0066cc;
}

.status-viewed {
    background-color: rgba(255, 153, 0, 0.1);
    color: var(--chtek-accent);
}

.status-partial {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.status-paid {
    background-color: rgba(0, 204, 0, 0.1);
    color: #00cc00;
}

.status-open,
.status-in_progress,
.status-completed {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-open {
    background-color: rgba(255, 0, 0, 0.1);
    color: #ff0000;
}

.status-in_progress {
    background-color: rgba(255, 153, 0, 0.1);
    color: var(--chtek-accent);
}

.status-completed {
    background-color: rgba(0, 204, 0, 0.1);
    color: #00cc00;
}

/* Profile Info */
.chtek-profile-info {
    background-color: var(--chtek-light-bg);
    padding: 20px;
    border-radius: 4px;
}

.chtek-profile-info p {
    margin: 10px 0;
    color: var(--chtek-text);
}

.chtek-profile-info strong {
    color: var(--chtek-primary);
}

/* Error Messages */
.chtek-error {
    background-color: rgba(255, 0, 0, 0.1);
    color: #ff0000;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #ff0000;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .chtek-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .chtek-user-info {
        flex-direction: column;
        width: 100%;
    }
    
    .chtek-logout-btn {
        width: 100%;
        text-align: center;
    }
    
    .chtek-tabs {
        flex-wrap: wrap;
    }
    
    .chtek-tab-button {
        flex: 1 1 50%;
    }
    
    .chtek-table {
        font-size: 12px;
    }
    
    .chtek-table th,
    .chtek-table td {
        padding: 8px;
    }
}
