:root {
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --surface-color: #ffffff;
    --error-color: #f44336;
    --success-color: #4CAF50;
    --text-primary: #333;
    --text-secondary: #666;
    --spacing-unit: 1rem;
    --accent-1: #667eea;
    --accent-2: #764ba2;
    --accent-3: #f093fb;
}

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

html, body {
    height: 100%;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float-bg 20s linear infinite;
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.2), transparent);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float-blob 12s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes float-bg {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

@keyframes float-blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 15px rgba(31, 38, 135, 0.2);
    position: relative;
    z-index: 10;
    animation: slide-up 0.6s ease-out;
}

.header-text h1 {
    font-size: 2rem;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.header-text h1:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: auto; /*1200px*/
    margin: 0 auto;
}

.logo-header {
    width: 150px;
    height: auto;
}

.header-text h1 {
    font-size: 2rem;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Main Wrapper */
/* .main-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    flex: 1;
    position: relative;
    z-index: 10;
} */
.main-wrapper {
    display: flex;
    flex-direction: column; /* or row depending on layout */
    gap: 2rem;
    max-width: auto;
    margin: 3rem auto;
    padding: 0 2rem;
    flex: 1;
    position: relative;
    z-index: 10;
}

/* Info Modal */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-modal.modal-show {
    opacity: 1;
}

.info-modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    background: rgba(244, 67, 54, 0.1);
    color: var(--error-color);
}

.info-modal-content h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    margin-top: 0;
}

.button-secondary {
    background: linear-gradient(135deg, #757575, #616161);
}

.button-secondary:hover {
    box-shadow: 0 8px 25px rgba(97, 97, 97, 0.6);
}

/* Info Section */
.info-section, .form-section {
    animation: slide-up 0.6s ease-out;
}

.info-section h2, .form-section h2 {
    font-size: 1.75rem;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-section h2 {
    color: white;
}

.info-card, .form-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.info-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.steps {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    counter-reset: step;
}

.steps li {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 147, 251, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    border: 1px solid rgba(33, 150, 243, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.steps li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(240, 147, 251, 0.2));
}

.steps li::marker {
    color: var(--primary-color);
    font-weight: 600;
}

.steps strong {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Buttons */
.button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
    width: 100%;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.6);
}

.button:active {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.button-success {
    background: linear-gradient(135deg, var(--success-color), #45a049);
}

.button-success:hover {
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.6);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.form-select, .form-file {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    font-family: inherit;
}

.form-select:focus, .form-file:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    background-color: rgba(255, 255, 255, 1);
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.file-label {
    display: block;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05), rgba(240, 147, 251, 0.05));
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-weight: 500;
}

.file-label:hover {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(240, 147, 251, 0.1));
    border-color: var(--accent-2);
}

.file-label.drag-over {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15), rgba(240, 147, 251, 0.15));
    border-color: var(--accent-2);
    transform: scale(1.02);
}

.form-file {
    display: none;
}

/* Messages */
.messages-container {
    margin-top: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    animation: slide-up 0.3s ease-out;
    font-weight: 500;
}

.alert-error {
    background-color: var(--error-color);
    color: white;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.2);
}

.alert-success {
    background-color: var(--success-color);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.alert-message {
    background-color: #ffc107;
    color: #333;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
    color: var(--text-secondary);
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1.5rem auto;
        padding: 0 1rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .header-text h1 {
        font-size: 1.5rem;
    }

    .info-section h2, .form-section h2 {
        font-size: 1.5rem;
    }

    .info-card, .form-card {
        padding: 1.5rem;
    }

    .button {
        padding: 10px 16px;
        font-size: 0.95rem;
    }

    .file-label {
        padding: 1.5rem;
    }

    .info-modal-content {
        padding: 2rem;
        max-width: 90%;
    }

    .info-modal-content h2 {
        font-size: 1.5rem;
    }

    .close-modal {
        font-size: 1.25rem;
    }
}

/* Data Display Section */
.data-section {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.data-section h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.data-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: slide-up 0.6s ease-out;
}

/* Statistics Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05), rgba(240, 147, 251, 0.05));
    border: 1px solid rgba(33, 150, 243, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(240, 147, 251, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Controls Section */
.controls-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.filter-controls {
    display: flex;
    gap: 0.75rem;
}

.button-small {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    white-space: nowrap;
}

.button-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.5);
}

.rows-per-page {
    padding: 0.7rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.rows-per-page:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Table Section */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    border: none;
    background: transparent;
}

.table-wrapper table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.table-wrapper thead {
    background: #1a1a2e;
}

.table-wrapper th {
    color: #ffffff;
    padding: 0.7rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border: none;
    position: sticky;
    top: 0;
    background: #1a1a2e;
    user-select: none;
}

.sortable-header {
    cursor: pointer !important;
    transition: background-color 0.2s ease;
}

.sortable-header:hover {
    background-color: #2a2a3e;
}

.sortable-header.sort-asc,
.sortable-header.sort-desc {
    background-color: #0d47a1;
}

.truncated-cell {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-wrapper td {
    padding: 0.65rem 1.5rem;
    border-bottom: 1px solid #e8e8e8;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.table-wrapper tbody tr {
    transition: background-color 0.2s ease;
    border: none;
}

.table-wrapper tbody tr:hover {
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.12), rgba(33, 150, 243, 0.06)) !important;
}

.table-wrapper tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.table-wrapper tbody tr:nth-child(even) {
    background-color: #f7f9fc;
}

.table-wrapper tbody tr:last-child td {
    border-bottom: none;
}

/* Data Actions */
.data-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.data-actions .button {
    flex: 1;
    min-width: 200px;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05), rgba(240, 147, 251, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.page-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.page-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.5);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
    min-width: 80px;
    text-align: center;
}

@media (max-width: 1024px) {
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .controls-section {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-controls {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .button-small,
    .rows-per-page {
        flex: 1;
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .data-section {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }

    .data-container {
        padding: 1.5rem;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .table-wrapper {
        font-size: 0.85rem;
    }

    .table-wrapper th,
    .table-wrapper td {
        padding: 0.5rem 0.75rem;
    }

    .data-actions {
        flex-direction: column;
    }

    .data-actions .button {
        min-width: 100%;
    }

    .search-input {
        font-size: 0.95rem;
    }

    .button-small,
    .rows-per-page {
        flex: 1;
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }

    .filter-controls {
        width: 100%;
        flex-wrap: wrap;
    }

    .pagination-controls {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .page-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}