:root {
    --bg-color: #0c111d;
    --primary: #4e7cfe;
    --primary-hover: #3b63d6;
    --secondary: #212936;
    --accent: #00d2ff;
    --text-primary: #f9fafb;
    --text-secondary: #9ea5b1;
    --error: #f04438;
    --success: #12b76a;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none; /* Prevent text selection as requested for security */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

h1, h2, .logo {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

.view {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    width: 100%;
}

.view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow);
    width: 90%;
    max-width: 450px;
    margin: auto;
}

.glass-container.x-large {
    max-width: 1100px;
    padding: 0;
    overflow: hidden;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
}

.brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

input[type="file"] {
    padding: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
    background: var(--primary);
    border: none;
    border-radius: 6px;
    color: #fff;
    padding: 0.4rem 0.8rem;
    margin-right: 1rem;
    cursor: pointer;
    font-weight: 600;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background: var(--primary-hover);
}

.brand span {
    color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Main Content */
main {
    padding: 3rem 2.5rem;
}

.title-section {
    margin-bottom: 2.5rem;
}

.title-section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.title-section p {
    color: var(--text-secondary);
}

/* Table */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.01);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.2rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 0.95rem;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.actions {
    text-align: right;
}

.edit-btn, .delete-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: var(--transition);
}

.edit-btn {
    background: rgba(78, 124, 254, 0.1);
    border: 1px solid rgba(78, 124, 254, 0.3);
    color: var(--primary);
}

.delete-btn {
    background: rgba(240, 68, 56, 0.1);
    border: 1px solid rgba(240, 68, 56, 0.3);
    color: var(--error);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #fff;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(78, 124, 254, 0.4);
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    border-radius: 10px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-ghost:hover {
    color: var(--error);
}

/* Inputs */
.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

.modal-content {
    max-width: 500px;
    padding: 2.5rem;
}

.modal-content h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.error-msg {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 1rem;
    text-align: center;
    height: 1.2rem;
}

.hidden {
    display: none !important;
}

.icon { font-style: normal; }

/* Responsive */
@media (max-width: 800px) {
    main { padding: 2rem 1.5rem; }
    .header-actions .btn-outline { display: none; }
}
