/* Modern Color Variables */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --danger-color: #7209b7;
    --background-color: #f8f9fa;
    --text-primary: #2b2d42;
    --text-secondary: #6c757d;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
}

/* Glassmorphism Logic */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Login Page Specifics */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-card {
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    background: white;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    font-weight: 700;
    color: var(--secondary-color);
}

.form-control {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Dashboard Cards */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    border: none;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.stats-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Sidebar */
.sidebar {
    background: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    padding-top: 1rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.main-content {
    margin-left: 260px;
    padding: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    padding: 0.8rem 1.5rem;
    border-radius: 0 25px 25px 0;
    margin-right: 1rem;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background-color: #eef2ff;
    color: var(--primary-color);
}

/* Section Headers for Add Employee Form */
.section-header {
    padding: 0.75rem 1.25rem;
    border-radius: 8px 8px 0 0;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.header-purple {
    background: linear-gradient(135deg, #7209b7, #560bad);
}

.header-teal {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.header-green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.header-blue {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
}

/* Reusing primary */
.header-yellow {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.header-red {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

/* Document Upload Box */
.upload-box {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-box:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.upload-box i {
    font-size: 2.5rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.upload-box.has-file {
    border-color: #10b981;
    background: #ecfdf5;
}

.upload-box.has-file i {
    color: #10b981;
}

/* Form Control Updates */
.form-input-group {
    background: white;
    padding: 1.5rem;
    border-radius: 0 0 12px 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.table-input td {
    padding: 0.5rem;
}

/* ------------------------------------------------------------------
   Employee Cards Grid System (Added request)
   ------------------------------------------------------------------ */
:root {
    --primary-blue: #5b6bff;
    --primary-light: #eef2ff;
    --success: #1f9254;
    --success-light: #e8f8f1;
    --warning: #ffad0d;
    --warning-light: #fff8e6;
    --danger: #ff4d4d;
    --danger-light: #ffe6e6;
    --gray-100: #f6f8fb;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #6b7280;
    --gray-800: #374151;
    --white: #ffffff;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.1);
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

.employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.employee-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    position: relative;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.employee-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.employee-card.active {
    border-top: 4px solid var(--primary-blue);
}

.employee-card.inactive {
    border-top: 4px solid var(--gray-300);
}

/* Top Segment */
.top-segment {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

.status-badge.active {
    background: var(--success-light);
    color: var(--success);
}

.status-badge.inactive {
    background: var(--gray-200);
    color: var(--gray-600);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-badge.active .status-dot {
    background: var(--success);
}

.status-badge.inactive .status-dot {
    background: var(--gray-600);
}

.actions-menu {
    position: relative;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: var(--transition);
}

.actions-menu:hover {
    background: var(--gray-100);
}

.actions-menu i {
    font-size: 18px;
    color: var(--gray-600);
}

.dropdown-menu-custom {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 200px;
    z-index: 100;
    display: none;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.actions-menu.show .dropdown-menu-custom {
    display: block;
}

/* Changed active to show for JS */

.dropdown-item-custom {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--gray-800);
    font-size: 14px;
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    background: white;
}

.dropdown-item-custom:hover {
    background: var(--gray-100);
    color: var(--primary-blue);
}

/* Employee Info */
.employee-info {
    display: flex;
    margin-bottom: 20px;
}

.avatar-container {
    margin-right: 16px;
    position: relative;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-light);
    background: #f1f5f9;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.online-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 14px;
    height: 14px;
    background: var(--success);
    border-radius: 50%;
    border: 2px solid var(--white);
}

.employee-details {
    flex: 1;
    overflow: hidden;
}

.employee-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.designation {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.employee-id,
.mobile-number {
    display: flex;
    align-items: center;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--gray-800);
}

.employee-id i,
.mobile-number i {
    margin-right: 8px;
    color: var(--primary-blue);
    width: 16px;
    text-align: center;
}

/* Stats */
.employee-stats {
    background: var(--gray-100);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.attendance-box {
    display: flex;
    align-items: center;
}

.attendance-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
    flex-shrink: 0;
}

.attendance-content {
    display: flex;
    flex-direction: column;
}

.attendance-label {
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 2px;
}

.attendance-status {
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.attendance-time {
    font-size: 11px;
    color: var(--gray-600);
}

/* Status Colors */
.attendance-box.absent .attendance-icon {
    background: var(--danger-light);
    color: var(--danger);
}

.attendance-box.absent .attendance-status {
    color: var(--danger);
}

.attendance-box.on-time .attendance-icon {
    background: var(--success-light);
    color: var(--success);
}

.attendance-box.on-time .attendance-status {
    color: var(--success);
}

.attendance-box.late .attendance-icon {
    background: var(--warning-light);
    color: var(--warning);
}

.attendance-box.late .attendance-status {
    color: var(--warning);
}

.attendance-box.inactive .attendance-icon {
    background: var(--gray-200);
    color: var(--gray-600);
}

.attendance-box.inactive .attendance-status {
    color: var(--gray-600);
}

.branch-badge {
    display: inline-flex;
    align-items: center;
    background: var(--primary-light);
    color: var(--primary-blue);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Meta */
.meta-info {
    background: var(--gray-100);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.join-date,
.last-time-in,
.last-time-out {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.join-date:last-child {
    margin-bottom: 0;
}

.join-date i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.action-buttons a,
.action-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-profile {
    background: var(--primary-blue);
    color: var(--white) !important;
}

.btn-profile:hover {
    background: #4a58e6;
}

.btn-edit {
    background: var(--white);
    color: var(--primary-blue) !important;
    border: 1px solid var(--primary-blue);
}

.btn-edit:hover {
    background: var(--primary-light);
}