/* style.css - Senzakahle SA Brand Colors */
/* Orange (#E8650A) - Main | Brown (#5C2A0A) - Secondary */
/* Save in: /public_html/portal/assets/css/style.css */

:root {
    /* Senzakahle SA Brand Colors */
    --brand-orange: #E8650A;
    --brand-orange-dark: #d45a08;
    --brand-orange-light: #f57c2e;
    --brand-brown: #5C2A0A;
    --brand-brown-dark: #3d1c06;
    --brand-black: #000000;
    --brand-cream: #FDF6F0;
    --brand-white: #FFFFFF;
    --brand-gray: #666666;
    --brand-light-gray: #f0f0f0;
    --brand-success: #28a745;
    --brand-warning: #ffc107;
    --brand-danger: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--brand-cream);
    color: var(--brand-black);
}

/* ============================================ */
/* LOGIN PAGE STYLES */
/* ============================================ */

.login-page {
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-brown) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.login-card {
    background: var(--brand-white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    margin-bottom: 20px;
}

.logo-img {
    max-width: 200px;
    height: auto;
}

.logo h1 {
    font-size: 24px;
    color: var(--brand-brown);
    margin-top: 10px;
}

.subtitle {
    color: var(--brand-gray);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--brand-brown);
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(232,101,10,0.1);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--brand-orange);
    color: var(--brand-white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    background: var(--brand-orange-dark);
    transform: translateY(-2px);
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    color: var(--brand-danger);
    border: 1px solid #fcc;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #888;
}

.login-footer code {
    background: var(--brand-cream);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 8px;
}

/* ============================================ */
/* DASHBOARD STYLES */
/* ============================================ */

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar - Brown Background */
.sidebar {
    width: 280px;
    background: var(--brand-brown);
    color: var(--brand-white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-logo {
    max-width: 140px;
    height: auto;
    margin-bottom: 15px;
}

.sidebar-header h2 {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--brand-white);
}

.sidebar-header p {
    font-size: 11px;
    opacity: 0.7;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
    margin: 4px 12px;
    border-radius: 10px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: var(--brand-white);
}

.nav-item.active {
    background: var(--brand-orange);
    color: var(--brand-white);
}

.nav-icon {
    font-size: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(220,53,69,0.2);
    color: #ff6b6b;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 24px;
    background: var(--brand-cream);
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--brand-white);
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.welcome h1 {
    font-size: 22px;
    margin-bottom: 4px;
    color: var(--brand-brown);
}

.welcome p {
    color: var(--brand-gray);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.role-badge {
    background: var(--brand-orange);
    color: var(--brand-white);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--brand-white);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-bottom-color: var(--brand-orange);
}

.stat-icon {
    font-size: 40px;
}

.stat-details h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--brand-brown);
}

.stat-details p {
    color: var(--brand-gray);
    font-size: 13px;
}

/* Cards */
.card {
    background: var(--brand-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--brand-white);
    border-bottom: 1px solid #eee;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--brand-brown);
}

.btn-link {
    color: var(--brand-orange);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.btn-link:hover {
    color: var(--brand-orange-dark);
    text-decoration: underline;
}

.card-body {
    padding: 20px;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead tr {
    border-bottom: 1px solid #eee;
}

.data-table th {
    text-align: left;
    padding: 12px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-brown);
}

.data-table td {
    padding: 12px 8px;
    font-size: 13px;
    border-bottom: 1px solid #f5f5f5;
}

.data-table tbody tr:hover {
    background: var(--brand-cream);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-identified { background: #e3f2fd; color: #1976d2; }
.status-bid_preparation { background: #fff3e0; color: #f57c00; }
.status-submitted { background: #e8f5e9; color: #388e3c; }
.status-awarded { background: #e8f5e9; color: #388e3c; }
.status-won { background: var(--brand-orange); color: var(--brand-white); }
.status-lost { background: #ffebee; color: var(--brand-danger); }
.status-planning { background: #e3f2fd; color: #1976d2; }
.status-in_progress { background: #fff3e0; color: #f57c00; }
.status-completed { background: #e8f5e9; color: #388e3c; }

/* Progress Bar */
.progress-bar {
    position: relative;
    width: 100px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    height: 20px;
}

.progress-fill {
    background: var(--brand-orange);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s;
}

.progress-bar span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 600;
    color: var(--brand-white);
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px;
}

/* Buttons */
.btn-primary {
    background: var(--brand-orange);
    color: var(--brand-white);
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--brand-orange-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--brand-brown);
    color: var(--brand-white);
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--brand-brown-dark);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
}