/* Responsive */
@media (max-width: 768px) {
    .actions a{
        width: 100%;
    }
    .stat-box {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* public/style.css */

/* Reset & Basic Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f6f9;
    color: #333;
    line-height: 1.6;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 80px;
    /* Space for FAB */
}

/* Header & Navigation */
header {
    background-color: #343a40;
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand a {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
    max-width: 77vw;
    /* Ensure truncation works on small screens */
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
    /* iOS fix: Ensure it has distinctive tap area */
    min-width: 44px;
    min-height: 44px;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #f8f9fa;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        margin-top: 10px;
        border-top: 1px solid #555;
        padding-top: 10px;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        margin: 10px 0;
        width: 100%;
        display: block;
    }
    .nav-brand a {
        font-size: 1.1rem;
    }
}

/* Typography */
h1,
h2,
h3 {
    color: #2c3e50;
    margin-top: 0;
}

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

a:hover {
    text-decoration: underline;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="number"],
input[type="file"],
select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input:focus,
select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Buttons */
button,
.button {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
    text-decoration: none;
    /* For anchor buttons */
}

button {
    background-color: #007bff;
    color: #fff;
}

button:hover {
    background-color: #0056b3;
}

/* Tables */
table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th,
td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #e9ecef;
    text-align: left;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

/* Alerts */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.p-20 {
    padding: 20px;
}

.bg-white {
    background-color: #fff;
}

.border {
    border: 1px solid #dee2e6;
}

.rounded {
    border-radius: 0.25rem;
}

/* Floating Action Button */
.fab-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    /* Standard FAB size */
    height: 60px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.14), 0 1px 18px rgba(0, 0, 0, 0.12), 0 3px 5px rgba(0, 0, 0, 0.2);
    /* Material Design shadow */
    font-size: 24px;
    z-index: 999;
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    /* Ensure no underline */
}

.fab-btn:hover {
    background-color: #0056b3;
    box-shadow: 0 8px 10px rgba(0, 0, 0, 0.14), 0 3px 14px rgba(0, 0, 0, 0.12), 0 5px 5px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
    color: white;
}

.fab-btn:active {
    box-shadow: 0 4px 5px rgba(0, 0, 0, 0.14), 0 1px 10px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
}

/* Keypad Styles */
.keypad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.keypad-row {
    display: flex;
    gap: 10px;
}

.keypad-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    border-radius: 10px;
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.keypad-btn:active {
    background-color: #e2e6ea;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-backspace {
    background-color: #ffc107;
    color: #212529;
}

.btn-clear {
    background-color: #dc3545;
    color: white;

    /* Full width for clear button */
}