/* =========================
   GLOBAL
========================= */
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #f1f5f9;
}

/* =========================
   LAYOUT
========================= */
body.layout {
    display: flex;
}

/* =========================
   SIDEBAR
========================= */
.sidebar {
    width: 220px;
    height: 100vh;
    position: fixed;

    padding: 20px;
    background: #1e293b;
    color: white;
}

.sidebar h3 {
    margin-bottom: 30px;
    text-align: center;
}

.sidebar a {
    display: block;
    padding: 10px;
    margin-bottom: 10px;

    color: #cbd5f5;
    text-decoration: none;
    border-radius: 6px;
}

.sidebar a:hover {
    background: #334155;
}

/* =========================
   MAIN CONTENT
========================= */
.main {
    margin-left: 240px;
    width: 100%;
    padding: 20px;
}

.topbar {
    display: flex;
    justify-content: space-between;

    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* =========================
   CARDS
========================= */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;

    margin-bottom: 20px;
}

.card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.card h3 {
    margin: 10px 0;
}

/* =========================
   FORM
========================= */
.form-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

input,
select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

button {
    padding: 12px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

button:hover {
    background: #1d4ed8;
}

/* =========================
   TABLE
========================= */
.table-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #2563eb;
    color: white;
    padding: 10px;
}

td {
    padding: 10px;
}

tr:nth-child(even) {
    background: #f9fafb;
}

tr:hover {
    background: #e2e8f0;
}

/* =========================
   STATUS BADGES
========================= */
.status {
    padding: 5px 10px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
}

.Active   { background: #22c55e; }
.InRepair { background: #f59e0b; }
.Retired  { background: #ef4444; }

/* =========================
   ACTION BUTTONS
========================= */
.actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    color: white;
}

.view-btn   { background: #10b981; }
.edit-btn   { background: #3b82f6; }
.delete-btn { background: #ef4444; }

/* =========================
   VIEW / EDIT PAGES
========================= */
.field {
    margin: 10px 0;
}

.label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.value {
    padding: 10px;
    background: #f9fafb;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 15px;

    color: white;
    text-decoration: none;
    border-radius: 6px;
}

.back { background: #64748b; }
.back:hover { background: #475569; }

.edit { background: #3b82f6; }

/* =========================
   LOGIN PAGE
========================= */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;

    height: 100vh;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    font-family: Arial, sans-serif;
}

.login-container {
  max-width: 400px;
  margin: 80px auto; /* centers horizontally */
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.login-left {
    width: 50%;
    padding: 40px;

    background: #2a5298;
    color: white;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-left h1 {
    margin-bottom: 10px;
}

.login-right {
    width: 50%;
    padding: 40px;
}

.login-right h2 {
    margin-bottom: 20px;
}

.login-right input {
    width: 100%;
    margin-bottom: 15px;
}

.login-right button {
    width: 100%;
    background: #2a5298;
}

.login-right button:hover {
    background: #1e3c72;
}

/* =========================
   MESSAGES
========================= */
.error {
    color: red;
    margin-bottom: 10px;
}

.success {
    color: green;
    margin-bottom: 10px;
}