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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --background: #f8fafc;
    --card: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}

html,
body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    position: relative;
    -webkit-touch-callout: none !important;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    -webkit-user-select: none;
}

input,
textarea,
[contenteditable] {
    -webkit-user-select: text !important;
    user-select: text !important;
}

a,
button,
input,
select,
textarea,
.btn,
.nav-link,
[role="button"],
i,
img {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}

a:focus,
button:focus,
.btn:focus,
.nav-link:focus,
[role="button"]:focus,
a:active,
button:active,
.btn:active,
.nav-link:active,
[role="button"]:active {
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
    -webkit-tap-highlight-color: transparent !important;
}

body {
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

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

.nav-link {
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.25);
}

.card {
    background: var(--card);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
}

/* Table Styling */
.table-wrapper {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8fafc;
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    border-bottom: 2px solid var(--border);
}

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

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

/* Auth Pages */
.auth-wrapper {
    min-height: calc(100vh - 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: var(--card);
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--border);
}

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

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #334155;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 1rem;
    outline: none;
    transition: 0.3s;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-up {
    animation: fadeUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.animate-fade {
    animation: fadeIn 0.8s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

@media (max-width: 991px) {

    .animate-up,
    .animate-fade,
    [class*="delay-"] {
        opacity: 1 !important;
        animation: none !important;
        transform: none !important;
        transition: none !important;
    }
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    z-index: 1100;
}

.hamburger i {
    font-size: 1.5rem;
    color: var(--text-dark);
    transition: 0.3s;
}

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

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        justify-content: center;
        padding: 4rem 2rem;
        transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
        z-index: 2000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        padding: 1.25rem;
        color: #1e293b;
        border-bottom: 1px solid #f1f5f9;
        text-decoration: none;
    }

    .nav-links form {
        width: 100%;
        margin-top: 1.5rem;
    }

    .nav-links .btn {
        width: 100%;
        padding: 1.25rem;
        border-radius: 1.25rem;
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    h1 {
        font-size: 1.85rem !important;
    }

    .navbar .container {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: left !important;
        gap: 0 !important;
    }

    [style*="display: grid"]:not(.navbar .container) {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    [style*="padding: 4rem"]:not(.navbar .container),
    [style*="padding: 3rem"]:not(.navbar .container) {
        padding: 1.5rem !important;
    }

    [style*="gap: 4rem"]:not(.navbar .container) {
        gap: 2rem !important;
    }

    .card {
        padding: 1.5rem !important;
        border-radius: 1.5rem !important;
    }

    [style*="margin-top: -80px"] {
        margin-top: -40px !important;
    }

    [style*="width: 160px"] {
        width: 120px !important;
        height: 160px !important;
    }

    [style*="font-size: 2.5rem"] {
        font-size: 1.75rem !important;
    }

    [style*="flex-direction: column"]:not(.navbar .container) {
        gap: 1rem !important;
    }

    [style*="display: flex; align-items: flex-end"]:not(.navbar .container) {
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
    }

    [style*="justify-content: space-between"]:not(.navbar .container) {
        flex-direction: column !important;
        gap: 1.5rem !important;
        align-items: flex-start !important;
    }
}