/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Colors */
    --primary-color: #0d9488;
    /* Teal 600 */
    --primary-dark: #0f766e;
    /* Teal 700 */
    --primary-light: #99f6e4;
    /* Teal 200 */
    --accent-color: #06b6d4;
    /* Cyan 500 */

    --bg-color: #f8fafc;
    /* Slate 50 */
    --card-bg: #ffffff;
    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */
    --border-color: #e2e8f0;
    /* Slate 200 */

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0d9488 0%, #06b6d4 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

main {
    flex: 1;
    padding-top: var(--header-height);
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--text-main);
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    min-width: 220px;
    padding: 0.5rem 0;
    list-style: none;
    border: 1px solid var(--border-color);
    z-index: 1000;
}

/* Invisible bridge to prevent menu from closing when moving mouse */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    width: 100%;
    height: 0.5rem;
    background: transparent;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-menu a:hover {
    background-color: #f8fafc;
    color: var(--primary-color);
}

.dropdown-menu i {
    width: 1.25rem;
    text-align: center;
    color: var(--primary-color);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    header .container {
        position: relative;
    }

    nav {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 280px;
        height: calc(100vh - var(--header-height));
        background: white;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }

    nav.mobile-active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }

    nav li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    nav a {
        display: block;
        padding: 1rem 1.5rem;
        width: 100%;
    }

    nav a:hover {
        background-color: #f8fafc;
    }

    /* Mobile Dropdown */
    .dropdown {
        position: static !important;
    }

    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        margin: 0;
        padding: 0;
        border: none;
        border-radius: 0;
        background: #f9fafb;
    }

    .dropdown.mobile-open .dropdown-menu {
        display: block;
    }

    .dropdown-menu li {
        border-bottom: 1px solid #e5e7eb;
    }

    .dropdown-menu li:last-child {
        border-bottom: none;
    }

    .dropdown-menu a {
        padding-left: 2.5rem;
        font-size: 0.9rem;
    }

    /* Responsive buttons */
    .btn {
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
    }

    nav .btn-outline,
    nav .btn-primary {
        display: block;
        width: calc(100% - 3rem);
        margin: 1rem 1.5rem;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    nav ul {
        gap: 1rem;
    }

    nav a {
        font-size: 0.9rem;
    }
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    opacity: 0.95;
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Typography Helpers */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Footer */
footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.hero-section {
    padding: 8rem 0 6rem;
    text-align: center;
    background: radial-gradient(circle at top right, var(--primary-light), transparent 40%),
        radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.1), transparent 40%);
}

@media (max-width: 768px) {

    /* Container */
    .container {
        padding: 0 1rem;
    }

    /* Typography */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Grids */
    .grid-3 {
        grid-template-columns: 1fr;
    }

    /* Cards */
    .card {
        padding: 1.5rem;
    }

    .card:hover {
        transform: none;
    }

    /* Hero Section */
    .hero-section {
        padding: 4rem 0 3rem;
    }

    /* Tables */
    table {
        font-size: 0.875rem;
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
    }

    .table-actions {
        flex-direction: column;
        gap: 0.25rem;
    }

    .table-actions .btn {
        width: 100%;
        font-size: 0.75rem;
    }

    /* Responsive table scroll */
    .card {
        overflow-x: auto;
    }

    /* Forms */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    /* Hide "old" nav ul placeholder */
    nav ul {
        display: flex !important;
    }
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: var(--text-main);
}

tr:hover {
    background-color: #f8fafc;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    border: none;
}