@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Nunito:wght@700;800;900&display=swap');
:root {
    --bg-tint: #f2fcf5;
    --light-green: #4ade80;
    --dark-green: #166534;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.6);
    --text-color: #1f2937;
    --shadow-sm: 0 4px 15px rgba(22, 101, 52, 0.05);
    --shadow-md: 0 8px 32px rgba(22, 101, 52, 0.1);
    --shadow-lg: 0 12px 40px rgba(22, 101, 52, 0.15);
}

body {
    font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg-tint);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(74, 222, 128, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(22, 101, 52, 0.15) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    box-sizing: border-box;
    text-transform: uppercase;
    font-weight: 600;
}

h1 { font-size: clamp(1.4rem, 5vw, 2.2rem); margin-bottom: 0.5rem; }
h2 { font-size: clamp(1.2rem, 4vw, 1.8rem); margin-bottom: 0.5rem; }
h3 { font-size: clamp(1rem, 3.5vw, 1.4rem); margin-bottom: 0.5rem; }

input, button, select, textarea, a, td, th {
    text-transform: uppercase;
    font-weight: 600;
}

.glass-panel {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)),
        url('Icon.png');
    background-position: center, center;
    background-size: cover, min(90vw, 80vh);
    background-repeat: no-repeat, no-repeat;
    background-attachment: local, fixed;
    background-color: transparent;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    padding: 3rem 2rem;
    width: 100%;
    max-width: 1200px;
    position: relative;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(0.5rem, 2vw, 1.5rem);
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.app-title {
    font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif;
    font-weight: 800;
    color: var(--dark-green);
    margin: 0;
    letter-spacing: -0.5px;
    font-size: clamp(0.6rem, 3.5vw, 1.8rem);
    white-space: nowrap;
}

.app-logo {
    width: 65px;
    height: 65px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.app-logo:hover {
    transform: scale(1.05);
}

h1, h2, h3 {
    color: var(--dark-green);
    margin-top: 0;
}
h1 {
    text-align: left;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
    letter-spacing: -0.5px;
}
h2 {
    text-align: left;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0;
}
h3 {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark-green);
}

input[type="text"], 
input[type="number"], 
input[type="date"],
select, input[type="file"] {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 2px solid rgba(74, 222, 128, 0.3);
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.3s ease;
    color: var(--text-color);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--dark-green);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2);
    background: #fff;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.85rem 1.8rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--light-green), var(--dark-green));
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(22, 101, 52, 0.2);
    width: 100%;
    box-sizing: border-box;
}
.btn i { margin-right: 8px; }

@media (min-width: 600px) {
    .btn { width: auto; }
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(22, 101, 52, 0.3);
}
.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark-green);
    border: 2px solid var(--light-green);
    box-shadow: none;
}
.btn-secondary:hover {
    background: var(--light-green);
    color: white;
}

.btn-action-edit {
    padding: 4px 16px;
    font-size: 1rem;
    background: linear-gradient(135deg, #34d399, #059669);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.2);
    transition: all 0.3s ease;
}
.btn-action-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(5, 150, 105, 0.3);
}

.btn-action-delete {
    padding: 4px 16px;
    font-size: 1rem;
    background: white;
    color: #dc2626;
    border: 2px solid #dc2626;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-action-delete:hover {
    background: #fef2f2;
    transform: translateY(-2px);
}

.btn-action-view {
    padding: 4px 16px;
    font-size: 1rem;
    background: white;
    color: var(--dark-green);
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-action-view:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 1.2rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 0.95rem;
    white-space: nowrap;
}

th {
    background: rgba(74, 222, 128, 0.15);
    color: var(--dark-green);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.6); }

.alert {
    padding: 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}
.alert-success {
    background: rgba(74, 222, 128, 0.15);
    color: #166534;
    border: 1px solid rgba(74, 222, 128, 0.5);
}

/* Tabs */
.tabs {
    margin-bottom: 2.5rem;
    background: rgba(255,255,255,0.4);
    padding: 0.5rem;
    border-radius: 16px;
    width: 100%;
}
.tabs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.tabs-flex {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tabs-flex::-webkit-scrollbar {
    height: 6px;
}
.tabs-flex::-webkit-scrollbar-thumb {
    background: rgba(22, 101, 52, 0.2);
    border-radius: 10px;
}
@media (min-width: 600px) {
    .tabs-grid, .tabs-flex {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 50px;
        overflow-x: visible;
    }
}
.tab-btn {
    padding: 0.8rem 0.5rem;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-green);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    word-wrap: break-word;
    line-height: 1.2;
}
.tabs-flex .tab-btn {
    padding: 0.8rem 1.5rem;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    flex-basis: auto !important;
    white-space: nowrap !important;
    min-width: max-content;
    display: inline-block;
}
@media (min-width: 600px) {
    .tab-btn, .tabs-flex .tab-btn {
        padding: 0.8rem 2rem;
        border-radius: 50px;
        font-size: 1rem;
        flex: 0 0 auto !important;
        display: flex;
    }
}
.tab-btn:hover { background: rgba(255,255,255,0.6); }
.tab-btn.active {
    background: linear-gradient(135deg, var(--light-green), var(--dark-green));
    color: white;
    box-shadow: var(--shadow-sm);
}
.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Flex Grid Utilities */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 900px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
}

.panel-card {
    background: rgba(255, 255, 255, 0.5);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
}
.panel-card:hover { box-shadow: var(--shadow-sm); }

#qrcode {
    margin: 1.5rem auto;
    display: flex;
    justify-content: center;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    width: max-content;
    box-shadow: var(--shadow-md);
}

/* Modal */
.modal-content {
    background: white; padding: 2.5rem; border-radius: 24px; width: 100%; max-width: 450px; text-align: center;
    box-shadow: var(--shadow-lg); animation: popIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Responsive Overrides */.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 50px;
    background-color: white;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 100;
    border-radius: 12px;
    padding: 1rem;
    text-align: left;
}
.dropdown-content.show {
    display: block;
}

@media (max-width: 768px) {
    body { padding: 1rem 0.5rem; }
    .glass-panel { padding: 1.2rem; border-radius: 16px; }
    .tabs { 
        flex-direction: row; 
        border-radius: 50px; 
        padding: 0.4rem; 
        gap: 0.3rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: space-between;
    }
    .tab-btn { 
        border-radius: 50px; 
        width: auto; 
        flex: 1;
        padding: 0.5rem 0.2rem;
        font-size: 0.75rem; 
        min-width: 0;
        white-space: nowrap;
    }
    .btn { width: 100%; margin-bottom: 0.5rem; }
    .flex-row { flex-direction: column; align-items: stretch; }
    h1 { font-size: 1.15rem; }
    h2 { font-size: 1.05rem; }
    h3 { font-size: 0.95rem; }
    th, td { font-size: 0.8rem; padding: 0.8rem 0.6rem; }
    .app-header { gap: 0.8rem; padding-bottom: 1rem; }
    .app-logo { width: 40px; height: 40px; }
    .panel-card { padding: 1.2rem; }
}
