body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
    overflow: hidden; /* Prevent scrolling */
    height: 100%; /* Ensure full height */
}
.header {
    width: 100%;
    background-color: #0056b3;
    color: #fff;
    padding: 1rem;
    text-align: left;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}
.header img {
    height: 60px;
    vertical-align: middle;
    margin-right: 10px;
}
.header span {
    font-size: 1rem;
}
.logo span {
    font-weight: bold;
}
.signin-container {
    background: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 150px; /* Adjust for header */
}
.signin-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 1rem;
}
.signin-container form {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    width: 100%;
    text-align: left;
}
.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
.form-group input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 4px rgba(0, 123, 255, 0.5);
}
.btn {
    background-color: #0056b3;
    color: #fff;
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}
.btn:hover {
    background-color: #007bff;
}
.signup-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    text-decoration: none;
    color: #0056b3;
}
.signup-link:hover {
    text-decoration: underline;
}
.header .user-info {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.header .user-info img {
    width: 40px;
    height: 40px;
    margin-right: 40px;
    margin-left: 20px;
    overflow-clip-margin: content-box;
    overflow-x: clip;
    overflow-y: clip;
}

.container {
    display: flex;
    width: 100%;
    margin-top: 90px;
    height: calc(100vh - 90px);
}

.sidebar {
    margin-top: 0px;
    width: 125px;
    background: #0056b3;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-menu {

    flex: 1 1 auto;           /* take all available space */
    overflow-y: auto;         /* scroll if too tall */
}

.sidebar-footer {
    flex: 0 0 auto;           /* only as tall as its contents */
    margin-bottom: 125px;
}

.tile {
    background: white;
    padding: 10px;
    margin-bottom: 15px;
    display: flex;
    color: black;
    align-items: center;
    cursor: pointer;
    border-radius: 5px;
	font-size: 12px;
}

.tile img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.tile span {
    font-size: 12px;
}

.tile bottom {
    margin-top: auto; /* Pushes it to the bottom */
}

.content {
    flex-grow: 1;
    padding: 20px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    margin-top: 3px;
    padding: 10px 20px;
    background: #0056b3;
    color: white;
    border-radius: 0px;
    cursor: pointer;
}

/* Modal Styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Gray out background */
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Above everything */
    padding: 20px; /* Add padding to prevent modal from touching viewport edges */
}

.modal-content {
    background: white;
    padding: 20px;
    width: 850px;
    max-width: 90vw; /* Responsive width */
    max-height: 90vh; /* Limit to 90% of viewport height */
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent content from spilling out */
    transition: all 0.3s ease; /* Smooth transition for fullscreen */
}

.form-group input[type="text"],
.form-group input[type="password"] {
    font-size: 12px;
    font-weight: normal;
    margin-bottom: 0px;
}

.form-group label {
    display: inline-block;
    font-weight: normal;
    font-size: 14px;
    margin-right: 10px;
	margin-left: 10px;
}

.form-group label input[type="radio"],
.form-group label input[type="checkbox"] 
{
    margin-right: 5px;
    width: auto;
    display: inline;
    margin-left: 20px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}

/* Delete button */
.delete-btn {
    background-color: #dc3545;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.delete-btn:hover {
    background-color: #c82333;
}

/* Cancel button */
.cancel-btn {
    background-color: #6c757d;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.cancel-btn:hover {
    background-color: #5a6268;
}

/* Form Styling */
.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: arial;
    font-size: 14px;
    resize: none;
    box-sizing: border-box;
}

.form-group textarea {
    height: 80px;
}

.btn {
    background-color: #0056b3;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

.btn:hover {
    background-color: #007bff;
}

/* Project List Styling */
.project-list {
    width: 100%;
    max-width: 800px;
    margin: auto;
    display: flex;
    flex-direction: column;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #ddd; /* Soft grey separator */
}

.project-item:last-child {
    border-bottom: none; /* Remove border from last item */
}

.project-details {
    flex-grow: 1;
}

.project-details h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.project-details .description {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.project-details .date {
    font-size: 12px;
    color: #999;
}

.project-actions {
    display: flex;
    gap: 15px;
    font-size: 18px; /* Adjust icon size */
}

/* Universal icon styling */
.icon {
    width: 24px;  /* Adjust icon size */
    height: 24px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, opacity 0.2s;
}

/* Edit icon (Blue) */
.edit-icon {
    opacity: 0.8;
}

.edit-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Delete icon (Red) */
.delete-icon {
    opacity: 0.8;
}

.delete-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

button.tile {
    border: none;             
    background: white;
    padding: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-radius: 5px;
    font-size: 12px;
    color: black;
    width: 100%;             
}

button.tile:focus { 
    outline: none; 
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: inline-block;
    vertical-align: middle;
}

.clickable-title {
    cursor: pointer;
    color: #0056b3;
    text-decoration: none;
}

.project-name-link {
    text-decoration: underline;
}

#help-tab {
  position: fixed;
  top: 120px;
  right: 0;
  z-index: 9999;
}

#help-handle {
  position: absolute;
  left: -60px;
  width: 60px;
  height: 100px;
  background: #444;
  color: white;
  writing-mode: vertical-rl;
  text-align: center;
  font-weight: bold;
  padding: 10px 0;
  cursor: pointer;
  border-radius: 8px 0 0 8px;
}

/* Fullscreen mode styles - force full width/height */
.modal.fullscreen-active {
    padding: 0;
    display: flex !important; /* Ensure flex is active */
    justify-content: stretch !important; /* Change from center to stretch */
    align-items: stretch !important; /* Change from center to stretch */
}

.modal.fullscreen-active .modal-content {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0;
    margin: 0;
    padding: 10px;
    flex: 1; /* Allow content to expand fully */
}

/* Make modal body scrollable */
.modal-content .modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* Important for flex children */
    margin: 10px 0;
    padding-right: 10px; /* Space for scrollbar */
}

/* Keep modal header fixed */
.modal-content h2 {
    flex-shrink: 0;
    margin-bottom: 15px;
}

/* Keep modal footer fixed */
.modal-content .modal-footer {
    flex-shrink: 0;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

/* Keep search section fixed if present */
.modal-content .search-section {
    flex-shrink: 0;
    margin-bottom: 15px;
}

/* For large modals, increase max dimensions */
.modal-content.large {
    width: 1200px;
    max-width: 95vw;
    max-height: 95vh;
}

/* Ensure table container fills available space in fullscreen */
.modal.fullscreen-active #table-container {
    height: 100%;
}

/* Add fullscreen toggle button styling */
.fullscreen-toggle {
    transition: background 0.3s ease;
}

.modal.fullscreen-active .fullscreen-toggle {
    background: #dc3545 !important; /* Red color when in fullscreen */
}

/* Settings Modal Styling */
.settings-section {
    text-align: left;
    margin-top: 1rem;
}

.settings-section h3 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.settings-section h3 i {
    margin-right: 0.5rem;
    color: #0056b3;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.settings-info {
    flex: 1;
}

.settings-info strong {
    display: block;
    color: #333;
    margin-bottom: 0.25rem;
}

.settings-info p {
    color: #666;
    font-size: 0.875rem;
    margin: 0;
}

.settings-action {
    margin-left: 1rem;
}

.settings-action .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Shared Project Styling */
.permission-shared {
    background-color: #e2e3e5;
    color: #383d41;
}

.permission-sharing {
    background-color: #d1ecf1;
    color: #0c5460;
}

.permission-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: normal;
    border-radius: 12px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.permission-read {
    background-color: #e9ecef;
    color: #495057;
}

.permission-execute {
    background-color: #d4edda;
    color: #155724;
}

.permission-write {
    background-color: #cce5ff;
    color: #004085;
}

/* Project status pills (home page) */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.55rem;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 12px;
    margin-left: 0.5rem;
    vertical-align: middle;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.status-pill-running {
    background-color: #dcfce7;
    color: #166534;
}

.status-pill-running .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #16a34a;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.75); }
}

.status-pill-scheduled {
    background-color: #ede9fe;
    color: #5b21b6;
}

.status-pill-scheduled .status-icon {
    font-size: 0.6rem;
}

/* Share Modal */
.share-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
}

.share-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

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

.share-user-info {
    flex: 1;
}

.share-user-email {
    font-weight: 500;
}

.share-user-name {
    font-size: 0.85rem;
    color: #666;
}

.share-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.share-actions select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.share-actions .btn-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.25rem;
}

.share-actions .btn-remove:hover {
    color: #c82333;
}