/* Sector 7 Portal — Pages CSS */
.s7-page {
    background: #f4f7fb;
    min-height: calc(100vh - 62px);
    padding-bottom: 48px;
}

.s7-page .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 0;
}

.s7-page .h1 {
    font-size: 1.7rem;
    font-weight: 700;
    color: #0d1a2e;
    margin: 0 0 6px;
}

.s7-page .sub {
    color: #6b7b8d;
    font-size: 0.95rem;
    margin: 0 0 24px;
}

.s7-page .card {
    background: #fff;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    padding: 22px 24px;
    margin-bottom: 20px;
}

.s7-page .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.s7-page .card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #0d1a2e;
}

.s7-page .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

/* Badges */
.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #e8edf5;
    color: #4a5568;
}
.badge.blue   { background: #dbeafe; color: #1d4ed8; }
.badge.green  { background: #dcfce7; color: #15803d; }
.badge.orange { background: #ffedd5; color: #c2410c; }
.badge.red    { background: #fee2e2; color: #b91c1c; }
.badge.purple { background: #f3e8ff; color: #7e22ce; }
.badge.gray   { background: #f1f5f9; color: #475569; }
.badge.yellow { background: #fef9c3; color: #854d0e; }

/* Key-Value pairs */
.kv {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 6px 12px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.kv dt {
    font-weight: 600;
    color: #6b7b8d;
    display: contents;
}
.kv dd {
    margin: 0;
    color: #1e2a3a;
}

/* Tables */
.s7-page .table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.s7-page .table th {
    background: #f4f7fb;
    color: #6b7b8d;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #dce4ee;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.s7-page .table td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf2f7;
    color: #2d3748;
    vertical-align: middle;
}
.s7-page .table tr:last-child td { border-bottom: none; }
.s7-page .table tr:hover td { background: #f8fafc; }
.s7-page .table a { color: #1e90ff; text-decoration: none; }
.s7-page .table a:hover { text-decoration: underline; }

.s7-page .info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 8px;
}

.s7-page .info-table p {
    font-size: 0.75rem;
}

.s7-page .info-table th {
    background: #f0f4f8;
    color: #0d1a2e;
    font-weight: 700;
    text-align: left;
    padding: 9px 14px;
    border: 1px solid #dce4ee;
}

.s7-page .info-table td {
    padding: 9px 14px;
    border: 1px solid #dce4ee;
    color: #4a5568;
    vertical-align: top;
}

.s7-page .info-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.s7-page .info-table a {
    color: #1e90ff;
    text-decoration: none;
    font-weight: 600;
}

.s7-page .info-table a:hover {
    text-decoration: underline;
}

.small { font-size: 0.82rem; color: #6b7b8d; }

/* Action bar */
.action-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

/* Forms */
.s7-form {
    max-width: 700px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.9rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dce4ee;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #1e2a3a;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 0 3px rgba(30,144,255,0.12);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

.form-hint {
    font-size: 12px;
    color: #6b7b8d;
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 14px;
    font-family: inherit;
    text-decoration: none;
    transition: opacity 0.15s, background 0.15s;
    white-space: nowrap;
}
.btn:hover { opacity: 0.88; }

.btn-primary   { background: #1e90ff; color: #fff; }
.btn-secondary { background: #f0f4fa; color: #333; border: 1px solid #dce4ee; }
.btn-danger    { background: #b30000; color: #fff; }
.btn-sm        { padding: 6px 13px; font-size: 12px; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}
.alert-success {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}
.alert-error {
    background: #fff1f2;
    color: #b91c1c;
    border-color: #fecdd3;
}
.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #dce4ee;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.tabs a {
    padding: 9px 16px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.tabs a:hover { color: #1e90ff; }
.tabs a.active {
    color: #1e90ff;
    border-bottom-color: #1e90ff;
    font-weight: 700;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #dce4ee;
    background: #fff;
    color: #333;
    transition: background 0.12s, border-color 0.12s;
}
.pagination a:hover {
    background: #f0f4fa;
    border-color: #1e90ff;
    color: #1e90ff;
}
.pagination span.active {
    background: #1e90ff;
    color: #fff;
    border-color: #1e90ff;
    font-weight: 700;
}

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.filter-bar label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
}
.filter-bar select {
    padding: 6px 10px;
    border: 1px solid #dce4ee;
    border-radius: 5px;
    font-size: 13px;
    background: #fff;
}

/* Ticket reply thread */
.reply-thread { margin-top: 24px; }
.reply {
    border: 1px solid #dce4ee;
    border-radius: 8px;
    margin-bottom: 14px;
    overflow: hidden;
}
.reply.internal { border-color: #fde68a; background: #fffbeb; }
.reply-header {
    background: #f4f7fb;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #6b7b8d;
}
.reply.internal .reply-header { background: #fef9c3; }
.reply-body {
    padding: 14px;
    font-size: 0.9rem;
    color: #1e2a3a;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Roadmap columns */
.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 20px;
}
@media (max-width: 900px) {
    .roadmap-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .roadmap-grid { grid-template-columns: 1fr; }
}
.roadmap-col {
    background: #f8fafc;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    padding: 16px;
}
.roadmap-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.roadmap-col-title {
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0d1a2e;
}
.roadmap-card {
    background: #fff;
    border: 1px solid #dce4ee;
    border-radius: 7px;
    padding: 12px 14px;
    margin-bottom: 10px;
}
.roadmap-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0d1a2e;
    margin-bottom: 5px;
}
.roadmap-card-desc {
    font-size: 0.82rem;
    color: #6b7b8d;
    line-height: 1.5;
    margin-bottom: 6px;
}
.roadmap-card-meta {
    font-size: 0.78rem;
    color: #9aabbd;
}
.roadmap-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

/* Quill editor — white background + override Quill's height:100% which causes
   grid overflow when the container is a grid item */
.ql-container.ql-snow,
.ql-editor {
    background-color: #fff;
    height: auto;
}

/* Constrain inline images so they never overflow the editor or view containers */
.ql-editor img {
    max-width: 100%;
    height: auto;
}
