/* ============================================
   Elisium Space - Certificate Verification System
   Design: Dark futuristic theme
   Colors: #0a0e17, #111625, #00f0ff, #7000ff
   ============================================ */

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111625;
    --bg-card: #151a2e;
    --accent-primary: #00f0ff;
    --accent-secondary: #7000ff;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(0, 240, 255, 0.15);
    --shadow-glow: 0 0 20px rgba(0, 240, 255, 0.1);
    --gradient-ambient: linear-gradient(135deg, #0a0e17 0%, #1a1f35 100%);
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
}

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

html { font-size: 16px; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    background-image: var(--gradient-ambient);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

/* ===== LOGIN PAGE ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container { width: 100%; max-width: 420px; }

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-accent);
    border-radius: 20px;
    padding: 48px 36px;
    box-shadow: 0 0 60px rgba(0, 240, 255, 0.05), 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-logo { text-align: center; margin-bottom: 36px; }

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.login-logo h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.login-form { display: flex; flex-direction: column; gap: 20px; }

.login-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 24px;
}

/* ===== FORM ELEMENTS ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.required { color: #ff4b4b; }

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 15px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group input::placeholder { color: var(--text-muted); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: #33f5ff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    color: var(--bg-primary);
}

.btn-secondary {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(0, 240, 255, 0.2);
    color: var(--accent-primary);
}

.btn-danger {
    background: rgba(255, 75, 75, 0.1);
    color: #ff4b4b;
    border: 1px solid rgba(255, 75, 75, 0.2);
}

.btn-danger:hover {
    background: rgba(255, 75, 75, 0.2);
    color: #ff4b4b;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

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

.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-nav {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
}

.sidebar-nav li { margin-bottom: 4px; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
}

.sidebar-nav a:hover {
    background: rgba(0, 240, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-primary);
    box-shadow: inset 3px 0 0 var(--accent-primary);
}

.sidebar-nav a i { width: 20px; text-align: center; }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 12px;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    color: #ff4b4b;
    font-size: 13px;
    font-weight: 500;
    transition: background var(--transition);
}

.btn-logout:hover {
    background: rgba(255, 75, 75, 0.1);
    color: #ff4b4b;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.top-bar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: rgba(17, 22, 37, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 16px;
    z-index: 50;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.current-date {
    color: var(--text-secondary);
    font-size: 13px;
}

.content-area { padding: 32px; }

/* ===== TOGGLE GROUP ===== */
.toggle-group {
    display: flex;
    gap: 8px;
}

.toggle-option {
    flex: 1;
    cursor: pointer;
}

.toggle-option input[type="radio"] {
    display: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    transition: all var(--transition);
    text-align: center;
}

.toggle-option input[type="radio"]:checked + .toggle-label.working {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: #00ff88;
}

.toggle-option input[type="radio"]:checked + .toggle-label.ended {
    background: rgba(255, 165, 0, 0.1);
    border-color: rgba(255, 165, 0, 0.3);
    color: #ffa500;
}

.toggle-label:hover {
    border-color: var(--border-accent);
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-primary);
}

.stat-active .stat-icon { background: rgba(0, 255, 136, 0.1); color: #00ff88; }
.stat-completed .stat-icon { background: rgba(255, 165, 0, 0.1); color: #ffa500; }
.stat-intern .stat-icon { background: rgba(112, 0, 255, 0.1); color: #b580ff; }

.stat-info { display: flex; flex-direction: column; }

.stat-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== TABLE ===== */
.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.table-header h3 { font-size: 18px; font-weight: 600; }

.filters-bar { margin-bottom: 20px; }

.filters-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

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

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-box input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 16px 10px 40px;
    font-size: 14px;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}

.search-box input:focus {
    border-color: var(--accent-primary);
}

.filters-form select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 36px 10px 14px;
    font-size: 14px;
    color: var(--text-primary);
    font-family: inherit;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
}

.data-table thead th {
    padding: 14px 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(0, 240, 255, 0.02);
}

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

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar i { color: var(--text-muted); font-size: 16px; }

.emp-id {
    font-family: monospace;
    font-size: 13px;
    color: var(--accent-primary);
    background: rgba(0, 240, 255, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-employee {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-primary);
}

.badge-intern {
    background: rgba(112, 0, 255, 0.1);
    color: #b580ff;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
}

.status-completed {
    background: rgba(255, 165, 0, 0.1);
    color: #ffa500;
}

.status-terminated {
    background: rgba(255, 75, 75, 0.1);
    color: #ff4b4b;
}

.action-buttons {
    display: flex;
    gap: 6px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.btn-view { color: var(--accent-primary); }
.btn-view:hover { background: rgba(0, 240, 255, 0.1); border-color: rgba(0, 240, 255, 0.2); color: var(--accent-primary); }
.btn-edit { color: #ffa500; }
.btn-edit:hover { background: rgba(255, 165, 0, 0.1); border-color: rgba(255, 165, 0, 0.2); color: #ffa500; }
.btn-delete { color: #ff4b4b; }
.btn-delete:hover { background: rgba(255, 75, 75, 0.1); border-color: rgba(255, 75, 75, 0.2); color: #ff4b4b; }

.empty-state {
    text-align: center;
    padding: 60px 20px !important;
    color: var(--text-muted);
}

.empty-state i { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state p { font-size: 15px; }

/* ===== ALERTS ===== */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert ul { list-style: none; padding: 0; }
.alert li { margin-bottom: 4px; }
.alert li:last-child { margin-bottom: 0; }

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.alert-error {
    background: rgba(255, 75, 75, 0.1);
    border: 1px solid rgba(255, 75, 75, 0.2);
    color: #ff4b4b;
}

/* ===== EMPLOYEE FORM ===== */
.form-container { max-width: 900px; }

.employee-form { display: flex; flex-direction: column; gap: 32px; }

.form-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px;
}

.form-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 8px;
}

/* ===== PHOTO UPLOAD ===== */
.photo-upload { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    flex: 1;
    min-width: 250px;
}

.upload-area:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 240, 255, 0.02);
}

.upload-area i { font-size: 36px; color: var(--text-muted); margin-bottom: 12px; }
.upload-area p { color: var(--text-secondary); font-size: 14px; }
.upload-area small { color: var(--text-muted); font-size: 12px; }
.upload-link { color: var(--accent-primary); cursor: pointer; }

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.photo-preview {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--accent-primary);
}

.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

.btn-remove-photo {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 75, 75, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

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

.current-photo img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 2px solid var(--border-accent);
    margin-bottom: 8px;
}

.current-photo p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== EMPLOYEE PROFILE ===== */
.employee-profile { max-width: 1100px; }

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--border-accent);
    flex-shrink: 0;
}

.profile-photo img { width: 100%; height: 100%; object-fit: cover; }

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    font-size: 36px;
    color: var(--text-muted);
}

.profile-info { flex: 1; }

.profile-info h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }

.profile-designation {
    color: var(--accent-primary);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
}

.profile-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.profile-emp-id {
    color: var(--text-secondary);
    font-size: 13px;
}

.profile-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.profile-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px;
}

.detail-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-primary);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.detail-item { display: flex; flex-direction: column; gap: 4px; }

.detail-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.detail-value { font-size: 15px; font-weight: 500; }

/* ===== QR CODE SECTION ===== */
.qr-section { position: sticky; top: calc(var(--topbar-height) + 32px); }

.qr-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
}

.qr-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--accent-primary);
}

.qr-display {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.qr-info {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 20px;
}

.qr-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .profile-body {
        grid-template-columns: 1fr;
    }

    .qr-section {
        position: static;
    }

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

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    }

    .main-content { margin-left: 0; }

    .sidebar-toggle { display: block; }

    .content-area { padding: 20px; }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card { padding: 16px; }
    .stat-number { font-size: 22px; }

    .form-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-actions {
        width: 100%;
        justify-content: center;
    }

    .filters-form {
        flex-direction: column;
    }

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

    .table-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }

    .data-table { font-size: 13px; }

    .login-card { padding: 32px 24px; }
}
