
/* Employee Management System Styles */
.ems-notice {
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 6px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ems-success {
    background-color: #f0f9f0;
    border-color: #28a745;
    color: #28a745;
}

.ems-warning {
    background-color: #fff8e1;
    border-color: #ffc107;
    color: #856404;
}

.ems-error {
    background-color: #fdecea;
    border-color: #dc3545;
    color: #dc3545;
}

.ems-info {
    background-color: #e8f4fd;
    border-color: #17a2b8;
    color: #17a2b8;
}

/* Profile Styles */
.ems-profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ems-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.ems-profile-header h2 {
    color: #2c3e50;
    margin: 0;
    font-size: 28px;
}

.ems-profile-status {
    font-weight: 500;
}

.status-active {
    color: #28a745;
    font-weight: 600;
}

.status-inactive {
    color: #dc3545;
    font-weight: 600;
}

.ems-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.ems-profile-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

.ems-profile-card.full-width {
    grid-column: 1 / -1;
}

.ems-card-header {
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 16px;
}

.ems-card-body {
    padding: 20px;
}

.ems-info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f1f1f1;
    align-items: flex-start;
}

.ems-info-row:last-child {
    border-bottom: none;
}

.ems-info-label {
    color: #6c757d;
    font-weight: 500;
    min-width: 140px;
    flex-shrink: 0;
}

.ems-info-value {
    font-weight: 500;
    color: #2c3e50;
    flex: 1;
}

.ems-notice-alert {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ems-no-notice {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    color: #155724;
}

/* Attendance Form Styles */
.ems-attendance-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.ems-attendance-header {
    text-align: center;
    margin-bottom: 30px;
}

.ems-attendance-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.ems-time-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.ems-time-display div {
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: #6c757d;
}

.ems-attendance-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    padding: 25px;
}

.ems-attendance-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ems-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ems-form-group label {
    font-weight: 600;
    color: #2c3e50;
}

.ems-form-group select,
.ems-form-group input,
.ems-form-group textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.ems-form-group select:focus,
.ems-form-group input:focus,
.ems-form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.ems-action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.ems-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ems-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ems-btn-success {
    background: #28a745;
    color: white;
}

.ems-btn-success:hover {
    background: #218838;
}

.ems-btn-danger {
    background: #dc3545;
    color: white;
}

.ems-btn-danger:hover {
    background: #c82333;
}

.ems-btn-primary {
    background: #007bff;
    color: white;
}

.ems-btn-primary:hover {
    background: #0056b3;
}

.ems-btn-sm {
    padding: 8px 15px;
    font-size: 14px;
}

/* Improved Table Styles */
.ems-log-container,
.ems-leave-admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ems-log-header,
.ems-leave-admin-header {
    margin-bottom: 30px;
}

.ems-log-header h2,
.ems-leave-admin-header h2 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 24px;
}

.ems-log-subtitle {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 20px;
}

.ems-table-container {
    overflow-x: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin: 20px 0;
}

.ems-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px; /* Larger font size */
}

.ems-data-table th {
    background: #2c3e50;
    color: white;
    padding: 16px 12px; /* More padding */
    text-align: left;
    font-weight: 600;
    font-size: 16px;
    white-space: nowrap; /* Prevent header text wrapping */
}

.ems-data-table td {
    padding: 14px 12px; /* More padding */
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
    min-width: 120px; /* Minimum width for cells */
}

.ems-data-table tr:hover {
    background-color: #f8f9fa;
}

/* Specific column widths for better layout */
.ems-data-table td:nth-child(1), /* Employee column */
.ems-data-table th:nth-child(1) {
    min-width: 180px;
}

.ems-data-table td:nth-child(2), /* Date column */
.ems-data-table th:nth-child(2) {
    min-width: 160px;
}

.ems-data-table td:nth-child(3), /* Check In column */
.ems-data-table th:nth-child(3),
.ems-data-table td:nth-child(4), /* Check Out column */
.ems-data-table th:nth-child(4) {
    min-width: 110px;
    text-align: center;
}

.ems-data-table td:nth-child(5), /* Work Hours column */
.ems-data-table th:nth-child(5) {
    min-width: 120px;
    text-align: center;
}

.ems-data-table td:nth-child(6), /* Status column */
.ems-data-table th:nth-child(6) {
    min-width: 140px;
    text-align: center;
}

.ems-status-badge {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px; /* Larger font */
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    min-width: 120px;
    text-align: center;
}

/* Responsive table improvements */
@media (max-width: 1024px) {
    .ems-data-table {
        font-size: 15px;
    }
    
    .ems-data-table th,
    .ems-data-table td {
        padding: 12px 10px;
    }
    
    .ems-status-badge {
        font-size: 13px;
        padding: 6px 10px;
        min-width: 110px;
    }
}

@media (max-width: 768px) {
    .ems-data-table {
        font-size: 14px;
    }
    
    .ems-data-table th {
        padding: 12px 8px;
        font-size: 14px;
    }
    
    .ems-data-table td {
        padding: 10px 8px;
    }
    
    /* Add data labels for mobile view */
    .ems-data-table {
        display: block;
    }
    
    .ems-data-table thead {
        display: none;
    }
    
    .ems-data-table tbody,
    .ems-data-table tr,
    .ems-data-table td {
        display: block;
        width: 100%;
    }
    
    .ems-data-table tr {
        margin-bottom: 15px;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 10px;
    }
    
    .ems-data-table td {
        border-bottom: 1px solid #f1f1f1;
        padding: 10px;
        position: relative;
        padding-left: 45%;
        min-width: auto;
        text-align: left;
    }
    
    .ems-data-table td:last-child {
        border-bottom: none;
    }
    
    .ems-data-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        top: 10px;
        width: 40%;
        font-weight: 600;
        color: #2c3e50;
    }
    
    .ems-status-badge {
        min-width: 100px;
    }
}

/* Calendar Styles - COMPLETELY UPDATED */
.ems-calendar-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
    overflow-x: auto;
}

.ems-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.ems-calendar-header h2 {
    color: #2c3e50;
    margin: 0;
    font-size: 20px;
}

.ems-month-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ems-month-selector label {
    font-weight: 600;
    color: #2c3e50;
}

.ems-month-selector input {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ems-calendar-table-container {
    overflow-x: auto;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

.ems-calendar-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 12px;
    min-width: 600px;
}

.ems-calendar-table th {
    background: #2c3e50;
    color: white;
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    border-right: 1px solid #3a4b5d;
}

.ems-calendar-table th:last-child {
    border-right: none;
}

.ems-calendar-employee {
    min-width: 120px;
    max-width: 120px;
    text-align: left;
    padding: 6px 8px;
    background: #f8f9fa;
    font-weight: 600;
    border-right: 1px solid #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ems-calendar-day {
    min-width: 28px;
    text-align: center;
    padding: 6px 2px;
    border-right: 1px solid #e0e0e0;
}

.ems-calendar-day:last-child {
    border-right: none;
}

.ems-calendar-total {
    min-width: 35px;
    text-align: center;
    padding: 6px 3px;
    background: #f8f9fa;
    font-weight: 600;
    border-left: 1px solid #e0e0e0;
}

.ems-day-number {
    font-size: 10px;
    font-weight: 600;
    display: block;
}

.ems-day-name {
    font-size: 9px;
    opacity: 0.8;
    display: block;
}

.ems-calendar-cell {
    text-align: center;
    padding: 6px 2px;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 11px;
    height: 24px;
}

.ems-calendar-cell:last-child {
    border-right: none;
}

.ems-calendar-cell.present {
    background: #d4edda;
    color: #155724;
}

.ems-calendar-cell.absent {
    background: #f8d7da;
    color: #721c24;
}

.ems-calendar-cell.weekend {
    background: #f8f9fa;
}

.ems-calendar-cell.weekend.present {
    background: #c3e6cb;
}

.ems-calendar-cell.weekend.absent {
    background: #f5c6cb;
}

/* Responsive adjustments for calendar */
@media (max-width: 768px) {
    .ems-calendar-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ems-month-selector {
        width: 100%;
        justify-content: flex-start;
    }
    
    .ems-calendar-employee {
        min-width: 100px;
        max-width: 100px;
        font-size: 11px;
    }
}

/* Leave Application Styles */
.ems-leave-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.ems-leave-header {
    text-align: center;
    margin-bottom: 30px;
}

.ems-leave-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.ems-leave-header p {
    color: #6c757d;
    margin: 0;
}

.ems-leave-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    padding: 25px;
}

.ems-leave-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Leave Status Styles */
.ems-leave-status-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.ems-leave-status-header {
    margin-bottom: 20px;
}

.ems-leave-status-header h3 {
    color: #2c3e50;
    margin: 0;
}

.ems-leave-status-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    padding: 25px;
}

.ems-leave-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ems-leave-detail {
    display: flex;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.ems-leave-detail:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ems-detail-label {
    color: #6c757d;
    font-weight: 500;
}

.ems-detail-value {
    font-weight: 500;
    color: #2c3e50;
}

/* Dashboard Widget Styles */
.ems-dashboard-widget {
    padding: 10px;
}

.ems-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ems-dashboard-table th {
    background: #f8f9fa;
    padding: 8px;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
}

.ems-dashboard-table td {
    padding: 8px;
    border-bottom: 1px solid #e9ecef;
}

.ems-dashboard-table tr:hover {
    background: #f8f9fa;
}

/* Admin Guide Styles */
.ems-admin-guide {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.ems-shortcode-list {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.ems-shortcode-item {
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ems-profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ems-action-buttons {
        flex-direction: column;
    }
    
    .ems-time-display {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .ems-calendar-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ems-month-selector {
        width: 100%;
    }
    
    .ems-data-table {
        font-size: 14px;
    }
    
    .ems-data-table th,
    .ems-data-table td {
        padding: 8px;
    }
    
    .ems-leave-detail {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .ems-profile-grid {
        grid-template-columns: 1fr;
    }
    
    .ems-info-row {
        flex-direction: column;
        gap: 5px;
    }
}
    