/* Base CSS Reset and Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* -- Dark Matte Black Theme Palette -- */
    --bg-app: #050505;
    /* Near Pure Black */
    --bg-panel: #121212;
    /* Matte Black Card */
    --bg-input: #1a1a1a;
    /* Slightly lighter for inputs */

    /* Subtle Gradient Accents (Abstract) */
    --gradient-primary: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    --gradient-btn: linear-gradient(135deg, #333333 0%, #222222 100%);
    --gradient-btn-hover: linear-gradient(135deg, #444444 0%, #333333 100%);

    --accent-color: #ffffff;
    /* Stark White for contrast */
    --accent-subtle: #444444;
    /* Dark Grey for borders/lines */

    --text-primary: #e5e5e5;
    /* Off-white for readability */
    --text-secondary: #a3a3a3;
    /* Neutral Grey */
    --text-muted: #525252;
    /* Dark Grey */

    --border-subtle: #262626;
    /* Very subtle border */
    --border-focus: #525252;
    /* Lighter grey focus */

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);

    --font-main: 'Inter', sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Red/Blue Darker Glow Gradient */
    --gradient-border: linear-gradient(45deg, #8b0000, #00008b);
    /* Dark Red to Dark Blue */
    --glow-color: rgba(139, 0, 0, 0.5);
    /* Reddish glow base */
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    /* Abstract Background Texture */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(139, 0, 0, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 0, 139, 0.05) 0%, transparent 20%);
}

/* --- Layout & Header --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

header {
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: var(--gradient-border);
    border-radius: 2px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    /* Thinner font for elegance */
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #ffffff, #888888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Tab Navigation --- */
.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding: 0.5rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border-bottom: 1px solid var(--border-subtle);
}

.tab-button {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: -6px;
    /* Align with border-bottom of container */
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-button:hover {
    color: var(--text-primary);
}

.tab-button.active {
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;

    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content h2 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2.5rem;
    border-left: 3px solid transparent;
    border-image: var(--gradient-border);
    border-image-slice: 1;
    padding-left: 1rem;
    /* Text Glow for Header */
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.1);
}

.hidden {
    display: none !important;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: transparent;
    /* Hide default border */
    background-color: #222;

    /* Gradient Border on Focus */
    border-image: var(--gradient-border);
    border-image-slice: 1;
    border-radius: 0;

    /* Glow Effect */
    box-shadow: 0 0 8px var(--glow-color);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient-btn);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--gradient-btn-hover);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-delete {
    background: transparent;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete:hover {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

/* --- Output Table (Interactive & Matte) --- */
.report-container {
    margin-top: 2rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--bg-panel);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    background-color: #0a0a0a;
    /* Darker header */
}

th {
    text-align: left;
    padding: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-subtle);
}

td {
    padding: 1.2rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: top;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: #1a1a1a;
    /* Subtle highlight */
}

.wrap-text {
    white-space: pre-wrap;
    min-width: 200px;
    line-height: 1.5;
}

/* Controls & Actions */
.controls,
.actions {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.actions {
    margin-top: 2.5rem;
    justify-content: flex-end;
    border-top: 1px solid var(--border-subtle);
    padding-top: 2rem;
}

.form-group.inline {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.form-group.inline label {
    margin-bottom: 0;
}

/* --- Manage Section --- */
.manage-section {
    margin-bottom: 4rem;
}

.manage-section h3 {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.add-employee-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.employee-list {
    list-style: none;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.employee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color 0.2s;
}

.employee-item:hover {
    background-color: #1a1a1a;
}

.employee-item:last-child {
    border-bottom: none;
}

.employee-item span {
    color: var(--text-primary);
}

/* --- Utilities --- */
#no-data-msg {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-weight: 300;
}

/* Responsive */
@media (max-width: 768px) {
    .tabs {
        flex-wrap: wrap;
        width: 100%;
        border-bottom: none;
    }

    .tab-button {
        flex: 1 1 auto;
        text-align: center;
        border-bottom: 1px solid var(--border-subtle);
    }

    .tab-button::after {
        display: none;
    }

    .tab-button.active {
        border-bottom: 2px solid var(--accent-color);
    }

    .add-employee-form {
        flex-direction: column;
    }

    .report-container {
        overflow-x: auto;
    }
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    opacity: 0.7;
}