/* ===== Reset and Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
}

body {
    background-color: #f5f7fa;
    color: #333;
    min-height: 100vh;
}

/* ===== Navigation Bar ===== */
.navbar {
    background-color: #283e4a;
    color: white;
    padding: 0.8rem 1rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: auto;
}

.nav-links a {
    color: #a9d2e4;
    margin-left: 1rem;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}
.nav-links a:hover {
    color: #f0a500;
}

/* ===== Container ===== */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 1rem;
}

/* ===== Flash Messages ===== */
.flash-messages {
    margin: 1rem 0;
}
.flash-message {
    padding: 0.7rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.flash-success { background-color: #d4edda; color: #155724; }
.flash-danger  { background-color: #f8d7da; color: #721c24; }
.flash-info    { background-color: #d1ecf1; color: #0c5460; }

/* ===== Auth Forms ===== */
.auth-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}
.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 370px;
    box-shadow: 0 0 10px rgba(0,0,0,0.08);
}
.auth-form .form-group {
    margin-bottom: 1rem;
}
.auth-form label {
    font-weight: 600;
    margin-bottom: 0.3rem;
    display: block;
}
.auth-form input {
    width: 100%;
    padding: 0.6rem;
    border-radius: 4px;
    border: 1px solid #ccc;
}
.auth-footer {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ===== Buttons ===== */
button, .btn-primary, .btn-secondary, .btn-success, .btn-warning {
    cursor: pointer;
    border: none;
    display: inline-block;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.25s ease;
}

.btn-block { width: 100%; }
.btn-full { width: 100%; }

.btn-primary   { background-color: #007bff; color: white; padding: 0.6rem; }
.btn-secondary { background-color: #6c757d; color: white; padding: 0.6rem; }
.btn-success   { background-color: #28a745; color: white; padding: 0.6rem; }
.btn-warning   { background-color: #ffc107; color: #212529; padding: 0.6rem; }
.btn-disabled  { background-color: #bbb; color: #666; padding: 0.6rem; cursor: not-allowed; }

.btn-primary:hover   { background-color: #0056b3; }
.btn-secondary:hover { background-color: #565e64; }
.btn-success:hover   { background-color: #1d9238; }
.btn-warning:hover   { background-color: #e0a800; }

/* ===== Box Grid ===== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    gap: 1rem;
}
.box-tile {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.box-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}
.box-number {
    font-size: 1.2rem;
}
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    margin: 0.2rem 0;
}
.status-available { background-color: #d4edda; color: #155724; }
.status-in_use    { background-color: #fff3cd; color: #856404; }
.status-locked    { background-color: #f8d7da; color: #721c24; }
.status-maintenance{background-color: #ececec; color: #555;}

/* ===== Forms inside box ===== */
.weight-form {
    margin-top: 0.5rem;
}
.weight-form input {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid #bbb;
    border-radius: 4px;
    margin-bottom: 0.4rem;
}

/* ===== Tables (Reports) ===== */
table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 1rem;
    background: white;
    border-radius: 5px;
    overflow: hidden;
}
th, td {
    padding: 0.75rem;
    border-bottom: 1px solid #ddd;
}
th {
    background-color: #007bff;
    color: white;
    text-align: left;
}
tr:hover td {
    background-color: #f5f5f5;
}

.auth-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.form-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.3rem;
    text-align: center;
}

.form-subtitle {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.4rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="file"] {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #007bff;
    outline: none;
}

.form-divider {
    margin: 1.5rem 0;
    border-top: 1px solid #eee;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    padding: 0.7rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 6px;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.mt-2 {
    margin-top: 1rem;
}

.auth-footer {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #007bff;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}


/* ===== Responsive Tweaks ===== */
@media (max-width: 768px) {
    .nav-container { flex-direction: column; align-items: flex-start; }
    .nav-links { margin-top: 0.5rem; }
}
@media (max-width: 500px) {
    .grid-container {
        grid-template-columns: 1fr 1fr;
    }
    .box-number { font-size: 1rem; }
}
