/* Shop Manager - Phase 1 - Simple & Clean UI */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f0f2f5;
    color: #222;
    line-height: 1.5;
    font-size: 15px;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top bar */
.topbar {
    background: #1e293b;
    color: #fff;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.logo {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo i {
    color: #38bdf8;
}

.main-nav {
    display: flex;
    gap: 6px;
    flex: 1;
}

.main-nav a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.main-nav a:hover,
.main-nav a.active {
    background: #334155;
    color: #fff;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.role-badge {
    background: #0ea5e9;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    text-transform: uppercase;
}

.user-info a {
    color: #94a3b8;
    font-size: 16px;
}
.user-info a:hover {
    color: #fff;
}

/* Content */
.content {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h1 i {
    color: #0ea5e9;
}

.page-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: #0ea5e9;
    color: #fff;
}
.btn-primary:hover {
    background: #0284c7;
}

.btn-success {
    background: #22c55e;
    color: #fff;
}
.btn-success:hover {
    background: #16a34a;
}

.btn-secondary {
    background: #e2e8f0;
    color: #334155;
}
.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}
.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 13px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
}

/* Cards & Panels */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
}

.card-body {
    padding: 18px;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
}

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

th, td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

tr:hover td {
    background: #f8fafc;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
    color: #334155;
}

.form-group label i {
    margin-right: 4px;
    color: #64748b;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-estimate { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dbeafe; color: #1e40af; }
.badge-in_progress { background: #e0e7ff; color: #3730a3; }
.badge-waiting_parts { background: #ffedd5; color: #9a3412; }
.badge-completed { background: #dcfce7; color: #166534; }
.badge-invoiced { background: #f3e8ff; color: #6b21a8; }
.badge-paid { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}

/* Search / filters */
.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-box input {
    padding-left: 36px;
}

/* Job Board specific */
.job-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.job-card {
    background: #fff;
    border-radius: 8px;
    border-left: 5px solid #0ea5e9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 14px;
}

.job-card.waiting_parts { border-left-color: #f97316; }
.job-card.in_progress { border-left-color: #6366f1; }
.job-card.completed { border-left-color: #22c55e; }

.job-card h3 {
    font-size: 15px;
    margin-bottom: 6px;
}

.job-card .meta {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.job-card .meta i {
    width: 16px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.empty-state i {
    font-size: 42px;
    margin-bottom: 12px;
    color: #cbd5e1;
}

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

.login-box {
    background: #fff;
    padding: 32px;
    border-radius: 10px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 22px;
}

.login-box .logo-big {
    text-align: center;
    font-size: 42px;
    color: #0ea5e9;
    margin-bottom: 10px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 16px;
    font-size: 13px;
    color: #94a3b8;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

/* Utility */
.text-muted { color: #64748b; }
.text-right { text-align: right; }
.mt-2 { margin-top: 12px; }
.mb-2 { margin-bottom: 12px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.items-center { align-items: center; }

@media (max-width: 900px) {
    .topbar {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
    }
    .main-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 6px;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}
