/* PlusNet Data - Dashboard & Layout Styles */

/* Layout with sidebar */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #2d5a3d;
    color: white;
    padding: 20px 0 0 0;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* Hamburger menu button */
.hamburger {
    display: none;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger span:first-child {
    margin-top: 0;
}

.hamburger span:last-child {
    margin-bottom: 0;
}

.sidebar-logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid #3d6a4d;
    margin-bottom: 20px;
}

.sidebar-logo img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
}

.sidebar-logo h2 {
    color: white;
    font-size: 18px;
    margin-top: 10px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.sidebar-menu li {
    padding: 0;
}

.sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #3d6a4d;
    color: white;
    border-left: 3px solid #4a8f5e;
}

.sidebar-menu .menu-icon {
    margin-right: 10px;
    color: #95a5a6;
}

.sidebar-menu a.active .menu-icon,
.sidebar-menu a:hover .menu-icon {
    color: #4a8f5e;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid #3d6a4d;
    background: #264a34;
    margin-top: auto;
}

.sidebar-footer-label {
    font-size: 11px;
    color: #95a5a6;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-footer-name {
    font-size: 14px;
    color: white;
    font-weight: 600;
    margin-bottom: 3px;
    line-height: 1.2;
}

.sidebar-footer-role {
    font-size: 12px;
    color: #bdc3c7;
    line-height: 1.2;
}

.sidebar-footer-version {
    font-size: 10px;
    color: #7a8a8b;
    margin-top: 8px;
    text-align: left;
    opacity: 0.7;
}

.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 20px;
    background: #f5f5f5;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.content-header {
    background: linear-gradient(135deg, #2d5a3d 0%, #4a8f5e 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h1 {
    color: white !important;
    font-size: 24px;
    margin: 0;
}

/* Hide mobile logo on desktop */
.mobile-header-logo {
    display: none;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

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

.account-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.2;
}

.account-email {
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.2;
}

.account-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

/* Notification Bell */
.notification-bell {
    font-size: 24px;
    color: white;
    transition: transform 0.2s;
}

.notification-bell:hover {
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

/* Notification Panel */
.notification-panel {
    position: absolute;
    top: 60px;
    right: 0;
    width: 450px;
    max-height: 600px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.notification-panel.show {
    display: block;
}

.notification-panel-header {
    background: linear-gradient(135deg, #2d5a3d 0%, #4a8f5e 100%);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-panel-body {
    max-height: 500px;
    overflow-y: auto;
}

.notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #e8f4ec;
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.notification-item-type {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.notification-item-type.bug {
    background: #dc3545;
    color: white;
}

.notification-item-type.feature {
    background: #4a8f5e;
    color: white;
}

.notification-item-type.improvement {
    background: #ff8800;
    color: white;
}

.notification-item-type.question {
    background: #17a2b8;
    color: white;
}

.notification-item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.notification-item-meta {
    font-size: 12px;
    color: #666;
}

.notification-item-time {
    font-size: 11px;
    color: #999;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

/* Priority Badges */
.priority-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.priority-critical {
    background: #dc3545;
    color: white;
}

.priority-high {
    background: #ff8800;
    color: white;
}

.priority-medium {
    background: #ffc107;
    color: #333;
}

.priority-low {
    background: #4a8f5e;
    color: white;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pending {
    background: #17a2b8;
    color: white;
}

.status-reviewing {
    background: #6f42c1;
    color: white;
}

.status-in_progress {
    background: #ff8800;
    color: white;
}

.status-completed {
    background: #28a745;
    color: white;
}

.status-rejected {
    background: #6c757d;
    color: white;
}

/* Completed Items */
.notification-item-completed {
    opacity: 0.6;
    background: #f8f9fa;
}

.notification-item-completed:hover {
    opacity: 0.8;
}

.notification-item-completed .notification-item-title {
    text-decoration: line-through;
    color: #666;
}

/* Notification Divider */
.notification-divider {
    padding: 12px 20px;
    background: linear-gradient(135deg, #e8f4ec 0%, #d4e8d9 100%);
    color: #2d5a3d;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 2px solid #4a8f5e;
    border-bottom: 2px solid #4a8f5e;
    text-align: center;
}

/* Toast Notifications */
.feedback-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.feedback-toast.show {
    transform: translateX(0);
}

.feedback-toast-success {
    border-left: 4px solid #28a745;
}

.feedback-toast-error {
    border-left: 4px solid #dc3545;
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    color: #333;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.account-menu {
    position: absolute;
    top: 55px;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 220px;
    display: none;
    z-index: 1001;
}

.account-menu.show {
    display: block;
}

.account-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.account-menu-item:last-child {
    border-bottom: none;
}

.account-menu-item:hover {
    background: #f8f9fa;
}

.account-menu-item label {
    cursor: pointer;
    margin: 0;
    font-size: 14px;
    color: #2d5a3d;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-menu-item span {
    color: #2d5a3d;
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
    background: #ccc;
    border-radius: 20px;
    transition: background 0.3s;
    cursor: pointer;
}

.toggle-switch.active {
    background: #4a8f5e;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch.active .toggle-slider {
    transform: translateX(20px);
}

.content-body {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.user-info {
    font-size: 14px;
    color: #333;
}

.logout-btn {
    width: auto;
    padding: 8px 16px;
    background: #4a8f5e;
    font-size: 14px;
}

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

.mobile-reports-toggle {
    display: none;
}

.section-toggle {
    background: white;
    border: 2px solid #4a8f5e;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.section-toggle:hover {
    background: #f8f9fa;
}

.section-toggle h3 {
    margin: 0;
    color: #2c3e50;
}

/* Page sections */
.login-page, .members-page {
    display: none;
}

.login-page.active, .members-page.active {
    display: block;
}

/* Search */
.search-bar {
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    max-width: 400px;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    margin-top: 20px;
    max-height: calc(100vh - 220px);
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1600px;
}

th, td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
    font-size: 13px;
}

th {
    background: #e8f4ec;
    font-weight: 600;
    color: #000;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

th:hover {
    background: #d4e8dc;
}

th.sortable::after {
    content: ' ↕';
    opacity: 0.3;
    font-size: 10px;
}

th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}

th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}

tr:hover {
    background: #f8f9fa;
    cursor: pointer;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    font-size: 13px;
}

.pagination button {
    width: auto;
    padding: 6px 14px;
    font-size: 13px;
}

/* Upload Section */
.upload-section {
    background: #f8f9fa;
    border: 2px dashed #4a8f5e;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    display: none;
    overflow: visible;
    position: relative;
}

.upload-section.show {
    display: block;
}

.upload-section h3 {
    color: #000;
    font-size: 18px;
    margin-bottom: 15px;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.file-input-label:hover {
    border-color: #4a8f5e;
    background: #f8f9fa;
}

.file-name {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

.upload-btn {
    width: auto;
    padding: 10px 20px;
    margin-top: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
    display: none;
}

.progress-bar.show {
    display: block;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4a8f5e 0%, #2d5a3d 100%);
    transition: width 0.3s;
    width: 0%;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.action-btn {
    padding: 5px 10px !important;
    width: auto !important;
    font-size: 12px !important;
    margin: 0 !important;
    white-space: nowrap;
}

.action-btn-edit {
    background: linear-gradient(135deg, #ff8800 0%, #ff6600 100%) !important;
}

.action-btn-delete {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

/* Users table */
#usersListContainer {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

#usersListContainer table {
    min-width: 1200px;
    width: 100%;
}

/* Report cards */
.report-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.report-card:active {
    transform: translateY(-1px);
}
