/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --sidebar-width: 250px;
    --sidebar-collapsed: 70px;
    --header-height: 70px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    overflow-x: hidden;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    padding: 40px;
    animation: slideUp 0.5s ease;
}

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

.login-logo {
    text-align: center;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

.login-logo i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.login-logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.login-form h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #2980b9;
}

.login-hint {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    font-size: 0.85rem;
    color: #666;
}

.login-hint p {
    margin-bottom: 5px;
}

/* Main Container */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    color: white;
    transition: width 0.3s;
    position: fixed;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.logo {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo i {
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.logo h2 {
    font-size: 1.5rem;
    transition: opacity 0.3s;
}

.sidebar.collapsed .logo h2 {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.nav-links {
    list-style: none;
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
}

.nav-links li {
    margin-bottom: 5px;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
    border-left: 4px solid var(--secondary-color);
}

.nav-links i {
    width: 24px;
    text-align: center;
    margin-right: 15px;
    font-size: 1.2rem;
}

.sidebar.collapsed .nav-links span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.user-info {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    transition: opacity 0.3s;
}

.sidebar.collapsed .user-details {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    margin-bottom: 3px;
}

.user-role {
    font-size: 0.85rem;
    color: #bbb;
}

.logout-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

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

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed);
}

.header {
    height: var(--header-height);
    background-color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.menu-toggle:hover {
    background-color: #f0f0f0;
}

.header h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.notification-bell:hover {
    background-color: #f0f0f0;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-time {
    font-weight: 500;
    color: var(--primary-color);
}

/* Content Area */
.content-area {
    padding: 30px;
    min-height: calc(100vh - var(--header-height));
}

.welcome-message {
    text-align: center;
    padding: 50px 20px;
}

.welcome-message h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.welcome-message p {
    color: #666;
    font-size: 1.1rem;
}

/* Notification Panel */
.notification-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.notification-panel.active {
    right: 0;
}

.notification-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    color: var(--primary-color);
}

.close-notifications {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.close-notifications:hover {
    background-color: #f0f0f0;
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.notification-item {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--secondary-color);
}

.notification-item.unread {
    background-color: #e8f4fc;
    border-left-color: var(--secondary-color);
}

.notification-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.notification-message {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.notification-time {
    font-size: 0.8rem;
    color: #999;
    text-align: right;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.card-icon.blue {
    background-color: var(--secondary-color);
}

.card-icon.green {
    background-color: var(--accent-color);
}

.card-icon.orange {
    background-color: var(--warning-color);
}

.card-icon.red {
    background-color: var(--danger-color);
}

.card-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.card-change {
    font-size: 0.9rem;
    color: #888;
}

.card-change.positive {
    color: var(--accent-color);
}

.card-change.negative {
    color: var(--danger-color);
}

/* Task Styles */
.task-container {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.task-list {
    display: grid;
    gap: 15px;
}

.task-item {
    padding: 20px;
    border-radius: 8px;
    background-color: #f8f9fa;
    border-left: 4px solid #ddd;
}

.task-item.pending {
    border-left-color: #6c757d;
}

.task-item.in-progress {
    border-left-color: var(--secondary-color);
}

.task-item.completed {
    border-left-color: var(--accent-color);
}

.task-item.overdue {
    border-left-color: var(--danger-color);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.task-title {
    font-weight: 600;
    color: var(--primary-color);
    flex: 1;
}

.task-priority {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

.priority-high {
    background-color: #ffebee;
    color: var(--danger-color);
}

.priority-medium {
    background-color: #fff3e0;
    color: var(--warning-color);
}

.priority-low {
    background-color: #e8f5e9;
    color: var(--accent-color);
}

.task-description {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
}

.task-actions {
    display: flex;
    gap: 10px;
}

.task-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

.task-btn:hover {
    opacity: 0.9;
}

.btn-start {
    background-color: var(--secondary-color);
    color: white;
}

.btn-complete {
    background-color: var(--accent-color);
    color: white;
}

.btn-view {
    background-color: #6c757d;
    color: white;
}

/* Google Workspace Embed */
.google-workspace-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.google-app {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.app-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
}

.app-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.gmail-icon {
    background-color: #d44638;
}

.drive-icon {
    background-color: #0F9D58;
}

.sheets-icon {
    background-color: #188038;
}

.meet-icon {
    background-color: #00897B;
}

.calendar-icon {
    background-color: #4285F4;
}

.app-title {
    font-weight: 600;
    color: var(--primary-color);
}

.app-iframe {
    width: 100%;
    height: 400px;
    border: none;
}

/* Attendance Tracker */
.attendance-tracker {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.time-tracker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.time-btn {
    padding: 30px 20px;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.time-btn i {
    font-size: 2rem;
}

.time-btn.checkin {
    background-color: var(--accent-color);
}

.time-btn.checkin:hover {
    background-color: #27ae60;
}

.time-btn.lunch {
    background-color: var(--warning-color);
}

.time-btn.lunch:hover {
    background-color: #e67e22;
}

.time-btn.checkout {
    background-color: var(--danger-color);
}

.time-btn.checkout:hover {
    background-color: #c0392b;
}

.time-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.time-btn.disabled:hover {
    transform: none;
}

.time-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Table Styles */
.table-container {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f9fa;
    color: var(--primary-color);
    font-weight: 600;
}

tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-present {
    background-color: #e8f5e9;
    color: var(--accent-color);
}

.status-absent {
    background-color: #ffebee;
    color: var(--danger-color);
}

.status-late {
    background-color: #fff3e0;
    color: var(--warning-color);
}

/* Form Styles */
.form-container {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.submit-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #2980b9;
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        width: var(--sidebar-collapsed);
    }
    
    .sidebar:not(.collapsed) {
        width: var(--sidebar-width);
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed);
    }
    
    .sidebar:not(.collapsed) + .main-content {
        margin-left: var(--sidebar-width);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 15px;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .google-workspace-container {
        grid-template-columns: 1fr;
    }
    
    .time-tracker {
        grid-template-columns: 1fr;
    }
    
    .notification-panel {
        width: 100%;
        right: -100%;
    }
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--secondary-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.text-right {
    text-align: right;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.p-20 {
    padding: 20px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}