/* Base styles and variable definitions */
:root {
    --bg-color: #085b65;
    --nb-bg-color: #043237;
    --card-bg: #ffffff;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
}

/* Navigation link layout */
.navbar {
    background-color: var(--nb-bg-color);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-btn {
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.container {
    max-width: 820px;
    margin: 2rem auto;
    padding: 1.5rem; /* Added padding so content doesn't hit image edges */
    border-radius: 8px; /* Optional: rounds container corners */

    /* 
      1. rgba(0, 0, 0, 0.5) creates a 50% transparent black overlay.
      2. url(...) loads the image relative to static/css/ style.css path.
    */
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7)), 
        url('../images/crimany.png');

    /* Ensure image scales properly and covers the container */
    background-size: contain;
    background-position: center;
    background-position-y: top;
    background-repeat: no-repeat;

    /* Brighten text color inside the container for contrast against the dark background */
    color: #ffffff; 
}

.card {
    /* Use semi-transparent dark or white background for inner card contrast */
    background-color: rgba(255, 255, 255, 0.8); 
    color: var(--text); /* Keep dark text inside cards */
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mt {
    margin-top: 1.5rem;
}

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

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

input[type="text"], textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}

/* Input typing field formatting */
input[type="password"] {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}

.btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
}

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

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

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

.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.item-card:last-child {
    border-bottom: none;
}

.item-card h3 {
    margin: 0 0 0.25rem 0;
}

.item-card p {
    margin: 0;
    color: var(--text-muted);
    background-color: #ffffff;
}

.empty-state {
    color: var(--text-muted);
    font-style: italic;
}

/* Authentication Card Sizing */
.auth-card {
    max-width: 400px;
    margin: 2rem auto;
}

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

/* Flash alerts */
.flash-wrapper {
    margin-bottom: 1rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.alert-success { background-color: #d1fae5; color: #065f46; }
.alert-danger { background-color: #fee2e2; color: #991b1b; }
.alert-info { background-color: #e0f2fe; color: #075985; }

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}
