/* Shared typography, forms, cards, tables, issue UI, and settings components */
/* ========================================
   TYPOGRAPHY
======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: .35rem;
}

p {
    margin-bottom: .75rem;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ========================================
   COMMON WRAPPERS
======================================== */
.page-wrap,
.dashboard-wrap,
.settings-wrap,
.issues-wrap,
.dash-wrap {
    max-width: 1400px;
    margin: auto;
    padding: 20px;
}

/* ========================================
   GLASS UI
======================================== */
.glass-card,
.table-box,
.table-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .20);
    padding: 20px;
}

.glass-soft {
    background: var(--glass-soft);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    padding: 14px;
}

.hero-card {
    background:
        linear-gradient(135deg,
            rgba(37, 99, 235, .35),
            rgba(14, 165, 233, .18));
    padding: 28px;
}

/* ========================================
   BUTTONS
======================================== */
.btn,
.login-btn,
.submit-btn,
.btn-custom {
    border-radius: 12px;
    transition: all .2s ease;
}

.btn:hover,
.login-btn:hover,
.submit-btn:hover,
.btn-custom:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* ========================================
   FORMS
======================================== */
.form-control,
.form-select,
.input {
    min-height: 46px;
    border-radius: 12px;
}

.form-control,
.form-select {
    border: 1px solid rgba(255, 255, 255, .08);
}

.glass-input,
.glass-select {
    background: rgba(255, 255, 255, .08) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, .52);
}

.glass-select option {
    color: #111;
}

textarea.form-control {
    min-height: auto;
}

/* ========================================
   HELPERS
======================================== */
.muted-text,
.sub-text {
    color: var(--text-soft);
}

.meta-label {
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.meta-value {
    color: #fff;
    font-weight: 600;
}

.page-title {
    font-size: 1.9rem;
    font-weight: 800;
}

/* ========================================
   RESPONSIVE
======================================== */
@media(max-width:768px) {

    .page-wrap,
    .dashboard-wrap,
    .settings-wrap,
    .issues-wrap,
    .dash-wrap {
        padding: 12px;
    }

    .glass-card,
    .table-box,
    .table-card {
        padding: 16px;
        border-radius: 18px;
    }

    .page-title {
        font-size: 1.35rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)) !important;
    }
}

@media(max-width:576px) {
    .btn {
        width: 100%;
    }
}

/* ========================================
   PART 2 â€” DASHBOARD + TABLES + FORMS
======================================== */

/* ========================================
   DASHBOARD HEADER
======================================== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.dashboard-header h4,
.dashboard-header h2 {
    margin-bottom: 4px;
}

.dashboard-header p {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
}

/* ========================================
   STATS GRID
======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.main-stat {
    display: grid;
    grid-template-columns: 1fr 2fr;
    margin-bottom: 14px;
    gap: 14px;
}

@media(max-width:768px) {
    .main-stat {
        grid-template-columns: 1fr;
        padding: 10px;
    }
}

.stat-card {
    border-radius: 20px;
    padding: 20px;
    min-height: 145px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
    transition: transform .2s ease, box-shadow .2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .22);
}

.stat-number {
    font-size: 52px;
    line-height: 1;
    font-weight: 800;
    text-align: right;
}

.stat-label {
    font-size: 18px;
    font-weight: 600;
    opacity: .92;
}

/* Color Variants */
.stat-card.blue,
.blue {
    background: linear-gradient(135deg, #0b7f82, #60d0c0);
}

.stat-card.red,
.red {
    background: linear-gradient(135deg, #dc2626, #f97316);
}

.stat-card.green,
.green {
    background: linear-gradient(135deg, #15803d, #22c55e);
}

.stat-card.gold,
.gold {
    background: linear-gradient(135deg, #f59e0b, #facc15);
    color: #111;
}

.stat-card.gray,
.gray {
    background: linear-gradient(135deg, #64748b, #94a3b8);
}

.stat-card.purple,
.purple {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

/* Responsive Stats */
@media(max-width:992px) {
    .stat-number {
        font-size: 42px;
    }

    .stat-label {
        font-size: 16px;
    }
}

@media(max-width:576px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }

    .stat-number {
        font-size: 30px;
    }

    .stat-label {
        font-size: 14px;
    }
}

/* ========================================
   HIGHLIGHT CARD
======================================== */
.highlight-card {
    background: linear-gradient(135deg, #f59e0b, #facc15);
    color: #111;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
}

.highlight-card h1 {
    font-size: 42px;
    font-weight: 800;
}

/* ========================================
   TABLES
======================================== */
.table-box {
    overflow-x: auto;
}

.custom-table,
.table-custom {
    color: #fff;
    min-width: 700px;
}

.custom-table thead th,
.table-custom thead th {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .08);
}

.custom-table td,
.custom-table th,
.table-custom td,
.table-custom th {
    border-color: rgba(255, 255, 255, .06);
    vertical-align: middle;
}

.table> :not(caption)>*>* {
    background: transparent !important;
    color: #fff;
    padding: .7rem;
}

code {
    color: #ffd369;
}

/* Mobile Table */
@media(max-width:576px) {
    .custom-table {
        min-width: 620px;
        font-size: 13px;
    }
}

/* ========================================
   LOGIN
======================================== */
.login-card {
    width: 100%;
    max-width: 360px;
    padding: 28px 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .92);
    color: #111;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .25);
    text-align: center;
}

.login-card-owner {
    max-width: 420px;
}

.login-card-company {
    width: 100%;
    max-width: 380px;
    overflow: hidden;
    border-radius: 18px;
}

.login-logo {
    width: 260px;
    max-width: 100%;
    height: auto;
    margin-bottom: 14px;
}

.login-input {
    width: 100%;
    border: none;
    outline: none;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 12px;
    background: #f8fafc;
}

.login-btn {
    width: 100%;
    border: none;
    padding: 12px;
    font-weight: 700;
    color: #fff;
    background: #2bb3b1;
}

.login-btn:hover {
    background: #249c9a;
}

/* ========================================
   GENERIC FORM LAYOUTS
======================================== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media(max-width:768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.readonly {
    background: rgba(255, 255, 255, .18);
    color: #ddd;
}

.error {
    color: #fecaca;
    margin-bottom: 10px;
}

/* ========================================
   FILE LIST
======================================== */
.file-list {
    margin-top: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
}

/* ========================================
   DROPDOWN / MODAL
======================================== */
.dropdown-menu {
    border: none;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

.modal-content {
    border-radius: 18px;
}

.title {
    text-align: center;
    margin-bottom: 18px;
}

/* ========================================
   PART 3 â€” ISSUES + DETAIL PAGE + CHAT + SETTINGS
======================================== */

/* ========================================
   ISSUE FILTER BAR
======================================== */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 18px;
}

.filter-bar .form-control,
.filter-bar .form-select {
    min-width: 180px;
}

.filter-bar .search-box {
    flex: 1;
    min-width: 220px;
}

@media(max-width:768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar .form-control,
    .filter-bar .form-select,
    .filter-bar .search-box {
        width: 100%;
        min-width: 100%;
    }
}

/* ========================================
   ISSUE STATUS BADGES
======================================== */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .42rem .85rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: .2px;
}

.status-open {
    background: #dc2626;
    color: #fff;
}

.status-progress {
    background: #f59e0b;
    color: #111;
}

.status-resolved {
    background: #16a34a;
    color: #fff;
}

.status-closed {
    background: #64748b;
    color: #fff;
}

/* ========================================
   ISSUE LIST CARD (Mobile)
======================================== */
.issue-card {
    display: none;
}

@media(max-width:768px) {
    .desktop-table {
        display: none;
    }

    .issue-card {
        display: block;
        margin-bottom: 14px;
        padding: 16px;
        border-radius: 18px;
        background: rgba(255, 255, 255, .08);
        border: 1px solid rgba(255, 255, 255, .08);
        backdrop-filter: blur(12px);
    }

    .issue-card h6 {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .issue-card .meta {
        font-size: 13px;
        color: rgba(255, 255, 255, .68);
    }
}

/* ========================================
   DETAIL PAGE
======================================== */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}

@media(max-width:992px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media(max-width:576px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.action-btn {
    width: 100%;
    border-radius: 14px;
    padding: 12px;
    font-weight: 700;
}

.file-link {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #8ec5ff;
    transition: .2s ease;
}

.file-link:hover {
    background: rgba(255, 255, 255, .08);
}

/* ========================================
   CHAT / COMMENTS
======================================== */
.chat-area {
    min-height: 420px;
    max-height: 68vh;
    overflow-y: auto;
    padding: 14px;
    background: linear-gradient(180deg, rgb(0 26 70), rgb(0 21 65));
    border-radius: 20px;
}

.chat-area::-webkit-scrollbar {
    width: 8px;
}

.chat-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .18);
    border-radius: 20px;
}

.bubble-me,
.bubble-other {
    padding: 12px 14px;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
    word-break: break-word;
}

.bubble-me {
    background: linear-gradient(135deg, #0b7f82, #075f64);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.bubble-other {
    background: rgba(255, 255, 255, .92);
    color: #111;
    border-bottom-left-radius: 6px;
}

.chat-time {
    font-size: 11px;
    margin-top: 6px;
    opacity: .72;
}

.chat-user {
    font-size: 12px;
    color: #93c5fd;
    margin-bottom: 4px;
    padding-left: 4px;
}

.chat-image {
    width: 100%;
    max-width: 260px;
    border-radius: 12px;
    margin-top: 8px;
    cursor: pointer;
}

/* ========================================
   SETTINGS CENTER
======================================== */
.settings-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
}

.settings-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-link {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
}

.settings-link:hover,
.settings-link.active {
    background: rgba(37, 99, 235, .35);
    border-color: rgba(37, 99, 235, .55);
}

.settings-panel {
    min-height: 520px;
}

@media(max-width:992px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-sidebar {
        overflow-x: auto;
        flex-direction: row;
        padding-bottom: 4px;
    }

    .settings-link {
        white-space: nowrap;
    }
}

/* ========================================
   TOASTS
======================================== */
.toast-container {
    z-index: 9999;
}

.toast {
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
}

/* ========================================
   PAGINATION
======================================== */
.pagination {
    gap: 6px;
    flex-wrap: wrap;
}

.page-link {
    border: none;
    border-radius: 10px !important;
    min-width: 38px;
    text-align: center;
}

.page-item.active .page-link {
    background: #0b7f82;
}

/* ========================================
   SMALL DEVICES
======================================== */
@media(max-width:576px) {
    .chat-area {
        max-height: 52vh;
    }

    .action-btn {
        padding: 10px;
        font-size: 14px;
    }

    .status-pill {
        font-size: .72rem;
        padding: .35rem .7rem;
    }
}
/* Keyboard focus for interactive cards and table rows. */
[role="link"][tabindex="0"]:focus-visible,
[role="button"][tabindex="0"]:focus-visible {
    outline: 3px solid var(--brand-accent, #42d3c8);
    outline-offset: 3px;
}
