/* Google Font */
@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap');

html, body {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #eee;
    color: #333;
}

/* ------------------------------
   TABULATOR GROUP ROW STYLE
------------------------------ */
.tabulator-row.tabulator-group span {
  margin-left: 10px;
  color: black;
}

/* ------------------------------
   SPINNER
------------------------------ */
.spinner-circle {
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ------------------------------
   TOOLBAR
------------------------------ */
.toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 18px;
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

/* Prevent text selection on toolbar labels */
.toolbar label {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.toolbar > div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ------------------------------
   INPUTS
------------------------------ */
input[type="text"],
select {
    padding: 5px 8px;
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
}

/* ------------------------------
   BUTTONS (MUI STYLE)
------------------------------ */
.mui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    user-select: none;
    text-decoration: none !important;
}

.mui-btn-primary {
    background-color: #1976d2;
    color: white;
}
.mui-btn-primary:hover {
    background-color: #1565c0;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.mui-btn-secondary {
    background-color: #e0e0e0;
    color: #000;
}
.mui-btn-secondary:hover {
    background-color: #d5d5d5;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.mui-btn-danger {
    background-color: #d32f2f;
    color: white;
}
.mui-btn-danger:hover {
    background-color: #c62828;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

/* ------------------------------
   MODAL
------------------------------ */
.mui-modal {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.mui-modal-content {
    background: #fff;
    width: 70%;
    max-height: 80%;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
}

.mui-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mui-modal-body {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 6px;
    overflow-y: auto;
    max-height: 60vh;
    white-space: pre-wrap;
    font-size: 14px;
}

/* ------------------------------
   TABULATOR TABLE
------------------------------ */
#issues-table {
    padding-left: 0px;
    padding-right: 0px;
    padding-bottom: 0px;
    box-sizing: border-box;
    min-width: max-content;
}

.tabulator {
    width: 100%;
    height: 100%;
    background-color: #fff;
    box-shadow: 0 0 13px rgba(0,0,0,0.1);
    border: none;
    font-size: 13px;
}

.tabulator-header {
    background-color: #00BCD4 !important;
    color: #fff !important;
}

.tabulator-col {
    background-color: #00BCD4 !important;
    color: #fff !important;
    border-right: 1px solid rgba(255,255,255,0.3);
}

.tabulator-row {
    border-bottom: 1px solid #ddd;
    background-color: #fff;
}

.tabulator-row:nth-child(even) {
    background-color: #f2f2f2;
}

.tabulator-row:hover {
    background-color: #c8e6c9 !important;
}

.tabulator-footer {
    border-top: 0px solid #ddd;
    padding: 0 0px;
    font-size: 14px;
    color: #555;
}

/* Hide pagination UI */
.tabulator-paginator,
.tabulator-page-size,
.tabulator-page {
    display: none !important;
}

/* ------------------------------
   FORCE REFRESH BUTTON
------------------------------ */
.force-refresh-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.force-refresh-btn .fr-text {
    visibility: visible;
}

.force-refresh-btn .fr-spinner {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: none;
}

.force-refresh-btn.loading .fr-text {
    visibility: hidden;
}

.force-refresh-btn.loading .fr-spinner {
    display: inline-flex;
}

/* ------------------------------
   LOGIN PAGE — MODERN BLUE UI
------------------------------ */
.login-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1565c0, #1e88e5);
    font-family: 'Roboto', sans-serif;
}

.login-container {
    width: 100%;
    max-width: 360px;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    padding: 32px 28px;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-title {
    margin: 0;
    text-align: center;
    font-size: 26px;
    font-weight: 600;
    color: #1565c0;
    letter-spacing: 1px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #bbb;
    font-size: 15px;
    transition: border-color 0.2s ease;
}

.login-form input:focus {
    border-color: #1565c0;
    outline: none;
}

.login-btn {
    margin-top: 6px;
    padding: 12px;
    background: #1565c0;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.login-btn:hover {
    background: #0d47a1;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.login-error {
    margin-top: 6px;
    color: #d32f2f;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

/* Fade-in animation for column filters */
.tabulator-header .tabulator-col .tabulator-header-filter {
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
}

.tabulator-header.filters-visible .tabulator-col .tabulator-header-filter {
    opacity: 1;
}

/* Flash animation when search resets */
.search-flash {
    animation: flashHighlight 0.45s ease-out;
}

@keyframes flashHighlight {
    0%   { background-color: #fff3cd; }
    100% { background-color: white; }
}
