@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap");

:root {
    --primary-color: #2d6a4f;
    --primary-light: #52b788;
    --primary-dark: #1b4332;
    --accent-color: #ff8c00;
    --bg-color: #d2d2d2;
    --card-bg: #ffffff;
    --card-bg-hover: #e6fef5;
    --text-main: #1b4332;
    --text-muted: #6b705c;
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Outfit", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

@media (max-width: 820px) {
    .container {
        padding: 1rem;
    }
}

header {
    background: var(--card-bg);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 820px) {
    header {
        padding: 1rem;
        flex-direction: column;
        justify-content: center;
    }
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-area img {
    height: 40px;
    width: auto;
}

@media (max-width: 820px) {
    .logo-area {
        width: 100%;
        justify-content: center;
    }
}

/* Typography */
h1,
h2,
h3 {
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

h1 {
    font-size: 2.25rem;
    letter-spacing: -0.02em;
}

@media (max-width: 820px) {
    h1 {
        font-size: 1.75rem;
    }
}

h2 {
    font-size: 1.75rem;
}

@media (max-width: 820px) {
    h2 {
        font-size: 1.5rem;
    }
}

h3 {
    font-size: 1.25rem;
    opacity: 0.8;
}

@media (max-width: 820px) {
    h3 {
        font-size: 1.1rem;
    }
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

@media (max-width: 820px) {
    nav ul {
        width: 100%;
        justify-content: center;
        gap: 0.75rem;
    }
}

nav a {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    white-space: nowrap;
}

@media (max-width: 820px) {
    nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Tables */
.table-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    overflow-x: auto;
    margin-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 820px) {
    .table-container {
        padding: 1rem;
        overflow-x: auto;
    }
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: var(--bg-color);
    color: var(--primary-dark);
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

@media (max-width: 820px) {
    th {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

@media (max-width: 820px) {
    td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(45, 106, 79, 0.02);
}

/* Forms */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

@media (max-width: 820px) {
    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="password"],
select,
textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: #fff;
    flex: 1;
    min-width: 100px;
}

@media (max-width: 820px) {
    input[type="text"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px;
        min-width: 100%;
    }
}

::selection,
:checked {
    outline: none;
    background: var(--card-bg-hover);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(29, 216, 122, 0.5);
    box-shadow: 0 0 0 6px rgba(29, 216, 122, 0.25);
}

a:focus,
input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(29, 216, 122, 0.5);
    box-shadow: 0 0 0 6px rgba(29, 216, 122, 0.25);
}

a.button,
input[type="submit"],
button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

@media (max-width: 820px) {
    a.button,
    input[type="submit"],
    button {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        flex: 1;
        min-width: 100px;
    }
}

input[type="submit"]:hover,
button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);

    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 71, 206, 0.531);
}

button.secondary {
    background: #e9ecef;
    color: var(--text-main);
}

button.secondary:hover {
    background: #dee2e6;
}

button.danger {
    background: #0d3e21;
    color: white;
}

button.danger:hover {
    background: #d90429;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    transition: var(--transition);
}

@media (max-width: 820px) {
    .pagination a,
    .pagination span {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

.pagination .current-page {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Login Page Specific */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url("../assets/hero.png");
    background-size: cover;
    background-position: center;
    padding: 1rem;
}

.cute-background {
    background:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url("../assets/hero.png");
    background-size: cover;
    background-position: center;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
    }
}

.login-card img {
    margin-bottom: 2rem;
    max-width: 100%;
    height: auto;
}

.login-card form {
    flex-direction: column;
}

/* Dashboard List */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 820px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        gap: 1rem;
    }
}

.nav-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    /*border: 2px solid lightblue;*/
}

@media (max-width: 820px) {
    .nav-card {
        padding: 1.5rem;
    }
}

.nav-card:hover {
    background: var(--card-bg-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
    
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(29, 216, 122, 0.5);
    box-shadow: 0 0 0 6px rgba(29, 216, 122, 0.25);
}
.nav-card:focus {
    background: var(--card-bg-hover);
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(29, 216, 122, 0.5);
    box-shadow: 0 0 0 6px rgba(29, 216, 122, 0.25);
}

@media (max-width: 820px) {
    .nav-card:hover {
        transform: translateY(-3px);
    }
}

.nav-card h3 {
    margin-bottom: 0.5rem;
}

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

/* Utilities */
.mb-2 {
    margin-bottom: 2rem;
}

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

.flex-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 820px) {
    .flex-inline {
        width: 100%;
    }
}

/* Action buttons container - responsive */
@media (max-width: 820px) {
    td:last-child > div {
        width: 100%;
    }
    
    td:last-child button,
    td:last-child form {
        width: 100%;
    }
}

/* Modal responsiveness */
@media (max-width: 820px) {
    div[id*="Backdrop"] {
        padding: 1rem !important;
    }
    
    div[id*="Backdrop"] .card {
        width: 100% !important;
        max-width: 95vw !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
}

/* Form grid responsiveness */
@media (max-width: 820px) {
    div[style*="display: grid; grid-template-columns: repeat(auto-fit"]  {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Header logout button responsiveness */
@media (max-width: 820px) {
    header form {
        width: 100%;
    }
    
    header form button {
        width: 100%;
    }
}

/* Install page responsiveness */
.setup-wizard section {
    width: 100%;
}

@media (max-width: 480px) {
    .setup-wizard section {
        padding: 1.5rem;
    }
    
    .setup-wizard h1 {
        font-size: 1.5rem;
    }
    
    .setup-wizard p {
        font-size: 0.95rem;
    }
}
