:root {
    --primary-yellow: #FFCB05;
    /* More vibrant yellow like image */
    --secondary-blue: #007bff;
    --accent-green: #28a745;
    --text-dark: #333;
    --text-light: #fff;
    --bg-light: #f4f6f9;
    --card-bg: #fff;
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header Styles */
.app-header {
    background-color: var(--primary-yellow);
    color: var(--text-dark);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    text-align: center;
    flex-grow: 1;
}

.back-link {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}

.btn-blue,
.btn-primary {
    background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
    /* Fallback or subtle gradient */
    background: linear-gradient(135deg, #007bff 0%, #0062cc 100%);
    /* Brighter Blue */
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    /* Pill shape for modern look */
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Drop shadow */
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-blue:active,
.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-blue:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #0069d9 0%, #005cbf 100%);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-danger:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Container */
.container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* Lists */
.card-list {
    background: transparent;
}

.list-header {
    background: white;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.list-header h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-item {
    background: white;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
}

.list-item:hover {
    background-color: #fafafa;
}

.list-item:active {
    background-color: #f0f0f0;
}

.item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.item-type {
    font-weight: 700;
    font-size: 16px;
}

.item-location {
    font-size: 14px;
    color: #666;
}

.item-meta {
    font-size: 12px;
    color: #999;
}

.status-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    background: #e9ecef;
    color: #495057;
    font-weight: 600;
}

.status-badge.expired {
    background: #ffebee;
    color: #c62828;
}

.status-badge.ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.btn-icon-delete {
    background: none;
    border: none;
    color: #dc3545;
    padding: 8px;
    margin-left: 10px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.1s;
    font-size: 18px;
    z-index: 5;
}

.btn-icon-delete:hover {
    background-color: #fff1f0;
    color: #c82333;
    transform: scale(1.1);
}

.btn-icon-delete:active {
    transform: scale(0.95);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    /* Darker backdrop */
    backdrop-filter: blur(4px);
    /* Modern blur effect */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background-color: #ffffff;
    width: 95%;
    /* Adjusted for mobile safety */
    max-width: 550px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.3s ease-out;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    border-radius: 16px 16px 0 0;
}

/* ... existing header h3/close styles ... */

.modal-body {
    padding: 25px;
    overflow-y: auto;
    background-color: #fff;
}



/* Form Styles matching Premium Look */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    /* Taller inputs */
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1rem;
    /* Readable text */
    margin-bottom: 20px;
    /* More space between inputs */
    box-sizing: border-box;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--secondary-blue);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 25px;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
    /* Subtle footer differentiation */
    border-radius: 0 0 16px 16px;
}

.btn-close-modal {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

/* Checkbox group */
.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px 0;
}

.dash-btn {
    border: none;
    border-radius: 12px;
    padding: 30px 20px;
    color: white;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: white;
    /* Fallback */
}

/* Login Styles */
.login-container {
    background-color: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.logo-area {
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 50px;
    margin-bottom: 10px;
    display: inline-block;
}

.logo-title {
    font-size: 24px;
    font-weight: 800;
    color: #333;
    margin: 0;
}

.logo-subtitle {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.btn-block {
    width: 100%;
    display: block;
    margin-top: 20px;
}

/* Ensure inputs without class also look okay, but prefer .form-control */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
    background: #fcfcfc;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-blue);
    background: white;
}

.dash-icon {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}

.dash-label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Button Colors */
.btn-extintor {
    background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
}

.btn-mangueira {
    background: linear-gradient(135deg, #1fa2ff 0%, #12d8fa 100%);
}

.btn-predio {
    background: linear-gradient(135deg, #f09819 0%, #edde5d 100%);
    color: #333;
}

.btn-usuario {
    background: linear-gradient(135deg, #302b63 0%, #24243e 100%);
}

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
}

/* Messages */
.message {
    text-align: center;
    margin-top: 10px;
    font-weight: 500;
}

.message.success {
    color: green;
}


.btn-green {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-green:hover {
    background: linear-gradient(135deg, #34ce57 0%, #28a745 100%);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-green:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-purple:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .modal-overlay {
        padding: 0;
    }

    .modal-content {
        width: 90%;
        max-width: none;
        margin: auto;
    }

    .modal-header,
    .modal-body,
    .modal-actions {
        padding: 15px 20px;
    }

    /* Better mobile spacing */
    .container {
        padding: 0 20px;
        /* Balanced padding */
        max-width: none;
        margin: 0;
        width: 100%;
    }

    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 0;
        /* Ensure no extra padding pushes content */
        width: 100%;
    }
}