/* ═══════════════════════════════════════════════════
   GaurkoTek Tasks – Board Styles v1.3 (Compact)
   ═══════════════════════════════════════════════════ */

.gkt-wrap { max-width: 100%; }
.gkt-frontend { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* ─── Board grid ─── */
.gkt-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 12px;
    min-height: 400px;
}
.gkt-column {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 8px;
    min-height: 300px;
}
.gkt-column h2 {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    gap: 6px;
}
.gkt-count {
    background: #64748b; color: #fff; font-size: 10px;
    border-radius: 10px; padding: 1px 6px; margin-left: auto;
}

/* ─── Compact clickable cards ─── */
.gkt-card {
    background: #fff; border-radius: 5px; padding: 6px 10px;
    margin-bottom: 4px; border-left: 4px solid #e2e8f0;
    transition: box-shadow .15s, background .1s; position: relative;
}
.gkt-card-clickable {
    cursor: pointer;
}
.gkt-card-clickable:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    background: #f8fafc;
}
.gkt-card.gkt-blocked { opacity: .6; border-left-color: #94a3b8; }

/* Single-row card layout */
.gkt-card-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.4;
}
.gkt-card-title-text {
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gkt-card-indicators {
    display: flex;
    gap: 3px;
    align-items: center;
    flex-shrink: 0;
    font-size: 11px;
}

/* Priority */
.gkt-priority {
    font-size: 9px; font-weight: 700; padding: 1px 5px;
    border-radius: 3px; color: #fff; white-space: nowrap;
    flex-shrink: 0;
}
.gkt-p1 { background: #dc2626; }
.gkt-p2 { background: #ea580c; }
.gkt-p3 { background: #2563eb; }
.gkt-p4 { background: #64748b; }

/* Due date indicators */
.gkt-due-indicator {
    font-size: 10px;
    padding: 0 3px;
    border-radius: 3px;
    white-space: nowrap;
}
.gkt-overdue { color: #dc2626; font-weight: 700; }
.gkt-due-soon { color: #ea580c; font-weight: 600; }
.gkt-due-ok { color: #64748b; }

/* Type (detail/meetings only) */
.gkt-type { font-size: 10px; padding: 1px 5px; border-radius: 3px; background: #e2e8f0; color: #334155; }
.gkt-type-responsibility { background: #a78bfa; color: #fff; }

/* Professor badge (in detail modal and tables) */
.gkt-badge {
    display: inline-block; font-size: 10px; padding: 1px 7px;
    border-radius: 10px; color: #fff; white-space: nowrap;
}
.gkt-lock { font-size: 11px; flex-shrink: 0; }

/* ─── Color legend ─── */
.gkt-color-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 4px;
    font-size: 11px;
    color: #475569;
}
.gkt-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.gkt-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ─── Filters ─── */
.gkt-filters {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0 2px;
}
.gkt-filters select, .gkt-filters input[type="text"] { min-width: 120px; padding: 4px 8px; }

/* ─── Counters ─── */
.gkt-counters {
    display: flex; gap: 14px; flex-wrap: wrap;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px;
    padding: 10px 14px; margin-bottom: 12px; font-size: 13px;
}

/* ─── Modals ─── */
.gkt-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 999999; display: flex; align-items: center; justify-content: center;
}
.gkt-modal {
    background: #fff; border-radius: 10px; padding: 0;
    width: 520px; max-width: 95vw; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0,0,0,.3);
}
.gkt-modal-large { width: 780px; }

.gkt-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px 12px; border-bottom: 1px solid #e2e8f0;
}
.gkt-modal-header h2 { font-size: 16px; margin: 0; }
.gkt-modal-x {
    background: none; border: none; font-size: 26px; cursor: pointer;
    color: #64748b; padding: 0 4px; line-height: 1;
}
.gkt-modal-x:hover { color: #1e293b; }

.gkt-modal form,
.gkt-modal > #gkt-detail-content {
    padding: 16px 24px;
}
.gkt-modal label {
    display: block; margin-bottom: 10px; font-size: 13px; font-weight: 500;
}
.gkt-modal input[type="text"],
.gkt-modal input[type="url"],
.gkt-modal input[type="date"],
.gkt-modal textarea,
.gkt-modal select {
    width: 100%; margin-top: 3px; padding: 6px 8px;
    border: 1px solid #ccc; border-radius: 4px; font-size: 13px;
}
.gkt-modal select[multiple] { height: 90px; }

.gkt-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.gkt-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.gkt-modal-actions {
    padding: 12px 24px 16px; display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid #f1f5f9;
}
.gkt-btn-danger { color: #b91c1c !important; border-color: #fca5a5 !important; }
.gkt-btn-danger:hover { background: #fef2f2 !important; }
.gkt-btn-warn { color: #92400e !important; border-color: #fcd34d !important; background: #fffbeb !important; }
.gkt-btn-warn:hover { background: #fef3c7 !important; }

/* wp_editor inside modal */
#gkt-f-desc-wrap { margin-bottom: 12px; }
#gkt-f-desc-wrap .wp-editor-wrap { border: 1px solid #ccc; border-radius: 4px; }

/* ─── Detail sections ─── */
.gkt-detail-section { margin-bottom: 14px; }
.gkt-detail-section h3 { font-size: 13px; font-weight: 700; margin: 0 0 4px; color: #475569; }
.gkt-detail-section p { margin: 2px 0; font-size: 13px; }
.gkt-detail-evidence-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.gkt-detail-evidence-list img { max-width: 120px; border-radius: 4px; border: 1px solid #e2e8f0; }
.gkt-detail-evidence-list a { font-size: 12px; }

.gkt-activity-log {
    max-height: 200px; overflow-y: auto; font-size: 12px;
    background: #f8fafc; padding: 8px; border-radius: 4px;
}
.gkt-activity-log div { padding: 2px 0; border-bottom: 1px solid #f1f5f9; }

/* Frontend button styles */
.gkt-frontend .button {
    display: inline-block; padding: 6px 14px; font-size: 13px;
    border: 1px solid #ccc; border-radius: 4px; background: #f7f7f7;
    cursor: pointer; text-decoration: none; color: #333; line-height: 1.4;
}
.gkt-frontend .button:hover { background: #eee; }
.gkt-frontend .button-primary { background: #2271b1; border-color: #2271b1; color: #fff; }
.gkt-frontend .button-primary:hover { background: #135e96; }

/* ─── Messages ─── */
.gkt-msg { padding: 8px 14px; border-radius: 6px; margin-bottom: 12px; font-size: 13px; }
.gkt-msg-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.gkt-msg-ok { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ─── Tables ─── */
.gkt-table th { font-size: 12px; }
.gkt-table td { font-size: 13px; vertical-align: middle; }
.gkt-table .gkt-badge { font-size: 11px; }

/* ─── Calendar ─── */
.gkt-cal-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}
.gkt-cal-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    min-width: 180px;
    text-align: center;
}

.gkt-calendar {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.gkt-calendar th {
    background: #f1f5f9;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 8px 4px;
    text-align: center;
    border-bottom: 2px solid #cbd5e1;
    color: #475569;
}
.gkt-calendar td {
    border: 1px solid #e2e8f0;
    vertical-align: top;
    padding: 4px;
    height: 100px;
    font-size: 12px;
    background: #fff;
}
.gkt-cal-empty {
    background: #f8fafc !important;
}
.gkt-cal-today {
    background: #eff6ff !important;
    box-shadow: inset 0 0 0 2px #3b82f6;
}
.gkt-cal-weekend {
    background: #fefce8 !important;
}
.gkt-cal-today.gkt-cal-weekend {
    background: #fef9c3 !important;
    box-shadow: inset 0 0 0 2px #3b82f6;
}
.gkt-cal-day-num {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 3px;
    text-align: right;
    padding-right: 2px;
}
.gkt-cal-today .gkt-cal-day-num {
    color: #2563eb;
    font-size: 13px;
}
.gkt-cal-tasks {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gkt-cal-event {
    display: block;
    padding: 2px 5px;
    border-radius: 3px;
    border-left: 3px solid #94a3b8;
    background: #f8fafc;
    font-size: 10px;
    line-height: 1.4;
    cursor: pointer;
    transition: background .1s;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.gkt-cal-event:hover {
    background: #e2e8f0;
}
.gkt-cal-ev-who {
    color: #94a3b8;
    font-size: 9px;
}

/* Admin: clickable day cells */
.gkt-cal-day {
    cursor: default;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .gkt-board { grid-template-columns: repeat(2, 1fr); }
    .gkt-calendar td { height: 80px; }
}
@media (max-width: 600px) {
    .gkt-board { grid-template-columns: 1fr; }
    .gkt-row3 { grid-template-columns: 1fr; }
    .gkt-row2 { grid-template-columns: 1fr; }
    .gkt-modal-large { width: 98vw; }
    .gkt-color-legend { gap: 6px; font-size: 10px; }
    .gkt-calendar td { height: 60px; font-size: 10px; }
    .gkt-cal-event { font-size: 9px; }
    .gkt-cal-nav h2 { font-size: 14px; min-width: 140px; }
}

/* ═══════════════════════════════════════════════════
   TODAY ALERTS POPUP
   ═══════════════════════════════════════════════════ */
.gkt-today-overlay {
    z-index: 100001;
    animation: gkt-fadeIn .25s ease;
}
@keyframes gkt-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.gkt-today-modal {
    width: 480px;
    max-width: 94vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: gkt-slideUp .3s ease;
}
@keyframes gkt-slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.gkt-today-header {
    background: #1e40af;
    color: #fff;
    border-radius: 8px 8px 0 0;
    padding: 14px 16px;
}
.gkt-today-header h2 {
    color: #fff;
    font-size: 17px;
}
.gkt-today-header .gkt-modal-x {
    color: rgba(255,255,255,.8);
}
.gkt-today-header .gkt-modal-x:hover {
    color: #fff;
}
.gkt-today-body {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
}
.gkt-today-section {
    margin-bottom: 14px;
}
.gkt-today-section:last-child {
    margin-bottom: 0;
}
.gkt-today-section h3 {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.gkt-today-item {
    background: #f8fafc;
    border-left: 4px solid #94a3b8;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.5;
}
.gkt-today-item:last-child {
    margin-bottom: 0;
}
.gkt-today-who {
    color: #64748b;
    font-size: 12px;
}
.gkt-today-desc {
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}
