/* FAST BUILDING ERP - Main Stylesheet */
/* Matches the dashboard design - dark theme with accent colors */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
}

/* Header */
.header {
    background: linear-gradient(135deg, #0f3460, #16213e);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #e94560;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo {
    max-height: 50px;
    max-width: 120px;
    object-fit: contain;
}

.header-title {
    font-size: 28px;
    letter-spacing: 2px;
}

.header-subtitle {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.role-badge {
    background: #e94560;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.date-display {
    font-size: 13px;
    color: #aaa;
}

.logout-btn {
    background: #fff2;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    color: #ccc;
    text-decoration: none;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #e94560;
    color: #fff;
}

/* Container Layout */
.container {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #16213e;
    padding: 20px 0;
    border-right: 1px solid #0f3460;
    overflow-y: auto;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar a:hover, .sidebar a.active {
    background: #0f3460;
    color: #fff;
    border-left: 3px solid #e94560;
}

.sidebar a .icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar .admin-link {
    margin-top: 20px;
    border-top: 1px solid #0f3460;
    padding-top: 20px;
}

/* Main Content */
.main {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Page Title */
.page-title {
    font-size: 22px;
    margin-bottom: 25px;
    color: #fff;
    border-bottom: 2px solid #e94560;
    padding-bottom: 10px;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: linear-gradient(135deg, #16213e, #0f3460);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #1a1a4e;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.15);
}

.card .card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.card h3 {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card .value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.card .change {
    font-size: 12px;
    margin-top: 8px;
}

.card .change.up { color: #4caf50; }
.card .change.down { color: #e94560; }

/* Tables */
.table-container {
    background: #16213e;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    overflow-x: auto;
}

.table-container h3 {
    margin-bottom: 16px;
    color: #fff;
    font-size: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #0f3460;
    font-size: 13px;
}

table th {
    color: #aaa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
}

table td { color: #ddd; }

/* Status Badges */
.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.status.approved, .status.active, .status.completed { background: #1b5e20; color: #81c784; }
.status.pending, .status.draft { background: #e65100; color: #ffb74d; }
.status.rejected, .status.cancelled { background: #b71c1c; color: #ef9a9a; }
.status.in-progress { background: #0d47a1; color: #64b5f6; }

/* Forms */
.form-container {
    background: linear-gradient(135deg, #16213e, #0f3460);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #1a1a4e;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #ccc;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #0f3460;
    border-radius: 8px;
    background: #1a1a2e;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #e94560;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary { background: #e94560; color: #fff; }
.btn-primary:hover { background: #d63851; transform: translateY(-2px); }

.btn-success { background: #4caf50; color: #fff; }
.btn-success:hover { background: #43a047; }

.btn-secondary { background: #0f3460; color: #fff; border: 1px solid #1a1a4e; }
.btn-secondary:hover { background: #16213e; }

.btn-sm { padding: 6px 14px; font-size: 12px; }

/* Action bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Alerts */
.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
}

.alert-success { background: #1b5e20; color: #81c784; }
.alert-error { background: #b71c1c; color: #ef9a9a; }
.alert-warning { background: #e65100; color: #ffb74d; }
.alert-info { background: #0d47a1; color: #64b5f6; }

/* Progress Bar */
.progress-bar {
    background: #0f3460;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    border-radius: 10px;
}

.fill.green { background: linear-gradient(90deg, #4caf50, #81c784); }
.fill.blue { background: linear-gradient(90deg, #1976d2, #64b5f6); }
.fill.orange { background: linear-gradient(90deg, #ff9800, #ffb74d); }
.fill.red { background: linear-gradient(90deg, #e94560, #ef9a9a); }

/* KPI Row */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.kpi-box {
    background: #0f3460;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
}

.kpi-box .kpi-val { font-size: 24px; font-weight: 700; color: #fff; }
.kpi-box .kpi-lbl { font-size: 11px; color: #aaa; margin-top: 6px; text-transform: uppercase; letter-spacing: 1px; }

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #1a1a2e;
}

.login-box {
    background: linear-gradient(135deg, #16213e, #0f3460);
    padding: 50px 40px;
    border-radius: 16px;
    width: 420px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 1px solid #1a1a4e;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 26px;
    color: #fff;
}

.login-box h1 span { color: #e94560; }

.login-box .subtitle {
    text-align: center;
    color: #aaa;
    margin-bottom: 30px;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .container { flex-direction: column; }
    .sidebar { width: 100%; display: flex; overflow-x: auto; padding: 10px; }
    .sidebar a { padding: 10px 16px; white-space: nowrap; }
    .main { padding: 20px; }
    .header { flex-direction: column; gap: 10px; padding: 15px 20px; }
    .cards-grid { grid-template-columns: 1fr; }
}


/* Print Styles */
@media print {
    .sidebar, .header, .header-right, .action-bar .btn, .logout-btn,
    .role-badge, .date-display, .footer, button { display: none !important; }
    .container { display: block !important; }
    .main { padding: 0 !important; }
    body { background: #fff !important; color: #000 !important; }
    .card, .form-container, .table-container { background: #fff !important; border: 1px solid #ddd !important; color: #000 !important; }
    .card h3, .card .value, table th, table td { color: #000 !important; }
    .page-title { color: #0f3460 !important; border-color: #e94560 !important; }
    table { border-collapse: collapse; }
    table th, table td { border: 1px solid #ddd; padding: 8px; }
    .status { border: 1px solid #333; padding: 2px 8px; }
}
