/* style.css - Mobile First */
:root {
    --primary: #694000;
    --primary-hover: #543300;
    --secondary: #ffffff;
    --danger: #ef4444;
    --success: #10b981;
    --bg: #69400026;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container h1 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--primary);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px 32px;
    padding-bottom: 80px;
    /* Space for fixed bottom buttons if any */
}

/* Typography */
h1,
h2,
h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.text-primary {
    color: var(--primary);
    font-weight: bold;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.text-success {
    color: var(--success);
    font-weight: bold;
}

.text-danger {
    color: var(--danger);
    font-weight: bold;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background-color: #f9fafb;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-large {
    padding: 16px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.9rem;
    width: auto;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* Header/Nav */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header h2 {
    font-size: 1.25rem;
    margin: 0;
}

.nav-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* Cards / Lists */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-box {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-box .title {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.stat-box .value {
    font-size: 1.25rem;
    font-weight: bold;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    /* Mobile friendly - bottom sheet style */
    justify-content: center;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--card-bg);
    width: 100%;
    max-width: 600px;
    border-radius: 20px 20px 0 0;
    padding: 24px 16px;
    transform: translateY(100%);
    transition: transform 0.3s;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

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

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Utilities */
.error {
    color: var(--danger);
    margin-bottom: 1rem;
    font-weight: 500;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.mb-4 {
    margin-bottom: 1rem;
}

.text-right {
    text-align: right;
}