/* ============================================================
   Framing Logic — Main Stylesheet
   ============================================================ */

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

body {
    font-family: Arial, sans-serif;
    font-size: 15px;
    background: #f4f4f4;
    color: #222;
}

a {
    color: #4a7bb5;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ---- Navbar ---- */
.navbar {
    display: flex;
    align-items: center;
    background: #2c3e50;
    color: #fff;
    padding: 0 20px;
    height: 54px;
    gap: 20px;
}
.navbar-brand {
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
    margin-right: 10px;
}
.navbar-links {
    list-style: none;
    display: flex;
    gap: 4px;
    flex: 1;
}
.navbar-links a {
    color: #ccc;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
}
.navbar-links a:hover {
    background: #3d5166;
    color: #fff;
    text-decoration: none;
}
.navbar-user {
    font-size: 13px;
    color: #aaa;
    white-space: nowrap;
}
.navbar-user a { color: #aaa; }
.navbar-user a:hover { color: #fff; }

/* ---- Main container ---- */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ---- Page title ---- */
h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
}
h2 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #2c3e50;
}

/* ---- Cards (dashboard boxes) ---- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}
.card {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #222;
    display: block;
    transition: box-shadow 0.15s;
}
.card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    text-decoration: none;
}
.card .card-icon { font-size: 36px; margin-bottom: 10px; }
.card .card-label { font-size: 14px; color: #555; }
.card .card-number { font-size: 28px; font-weight: bold; color: #2c3e50; }

/* ---- Stat strip ---- */
.stat-strip {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.stat {
    background: #fff;
    border-left: 4px solid #4a7bb5;
    padding: 12px 18px;
    border-radius: 4px;
    min-width: 150px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.stat.green  { border-color: #27ae60; }
.stat.orange { border-color: #e67e22; }
.stat.red    { border-color: #e74c3c; }
.stat-label  { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value  { font-size: 22px; font-weight: bold; color: #2c3e50; }

/* ---- Tables ---- */
.table-wrap {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
    margin-bottom: 24px;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}
th {
    background: #f8f8f8;
    font-weight: bold;
    color: #555;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.4px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* ---- Status badges ---- */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    text-transform: capitalize;
}
.badge-estimate    { background: #eaf0fb; color: #4a7bb5; }
.badge-in_progress { background: #fef3e0; color: #e67e22; }
.badge-ready       { background: #eafaf1; color: #27ae60; }
.badge-delivered   { background: #f0f0f0; color: #888; }
.badge-cancelled   { background: #fdecea; color: #e74c3c; }

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; text-decoration: none; }
.btn-primary  { background: #4a7bb5; color: #fff; }
.btn-success  { background: #27ae60; color: #fff; }
.btn-danger   { background: #e74c3c; color: #fff; }
.btn-secondary{ background: #95a5a6; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 13px; }

/* ---- Forms ---- */
.form-box {
    background: #fff;
    border-radius: 6px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    max-width: 700px;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: Arial, sans-serif;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a7bb5;
    box-shadow: 0 0 0 2px rgba(74,123,181,0.2);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* ---- Alerts ---- */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: #eafaf1; color: #1e8449; border: 1px solid #a9dfbf; }
.alert-error   { background: #fdecea; color: #a93226; border: 1px solid #f5b7b1; }
.alert-info    { background: #eaf0fb; color: #1a5276; border: 1px solid #aec6ef; }

/* ---- Login page ---- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2c3e50;
}
.login-box {
    background: #fff;
    border-radius: 8px;
    padding: 36px 32px;
    width: 360px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.login-box h1 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 6px;
}
.login-box .login-sub {
    text-align: center;
    color: #888;
    font-size: 13px;
    margin-bottom: 24px;
}

/* ---- Footer ---- */
.site-footer {
    text-align: center;
    color: #aaa;
    font-size: 12px;
    padding: 30px 0 20px;
}

/* ---- Page header bar ---- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.page-header h1 { margin-bottom: 0; }
