/* =============================================================================
   Surat Kampus Generator – Frontend CSS
   ============================================================================= */

/* ── Google Fonts Import ───────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────────────────────── */
.pdfgen-wrap,
.pdfgen-form-wrap {
    --pdfgen-primary:      #4f46e5;
    --pdfgen-primary-dark: #3730a3;
    --pdfgen-primary-light:#ede9fe;
    --pdfgen-accent:       #06b6d4;
    --pdfgen-success:      #10b981;
    --pdfgen-error:        #ef4444;
    --pdfgen-warning:      #f59e0b;
    --pdfgen-bg:           #f8fafc;
    --pdfgen-card-bg:      #ffffff;
    --pdfgen-border:       #e2e8f0;
    --pdfgen-text:         #1e293b;
    --pdfgen-muted:        #64748b;
    --pdfgen-radius:       12px;
    --pdfgen-radius-sm:    8px;
    --pdfgen-shadow:       0 4px 24px rgba(0,0,0,.08);
    --pdfgen-shadow-lg:    0 8px 40px rgba(0,0,0,.12);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Container ─────────────────────────────────────────────────────────────── */
.pdfgen-wrap {
    max-width: 860px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ── Selector Card ─────────────────────────────────────────────────────────── */
.pdfgen-selector-card {
    background: var(--pdfgen-card-bg);
    border-radius: var(--pdfgen-radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--pdfgen-shadow);
    border: 1px solid var(--pdfgen-border);
}

.pdfgen-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--pdfgen-text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pdfgen-icon { font-size: 1.8rem; }

.pdfgen-subtitle {
    color: var(--pdfgen-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ── Template Grid ─────────────────────────────────────────────────────────── */
.pdfgen-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.pdfgen-template-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem;
    border: 2px solid var(--pdfgen-border);
    border-radius: var(--pdfgen-radius-sm);
    background: var(--pdfgen-bg);
    cursor: pointer;
    text-align: left;
    transition: all .2s ease;
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--pdfgen-text);
}

.pdfgen-template-card:hover {
    border-color: var(--pdfgen-primary);
    background: var(--pdfgen-primary-light);
    color: var(--pdfgen-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(79,70,229,.15);
}

.pdfgen-template-icon { font-size: 1.4rem; flex-shrink: 0; }
.pdfgen-template-name { flex: 1; }
.pdfgen-template-arrow { color: var(--pdfgen-muted); transition: transform .2s; }
.pdfgen-template-card:hover .pdfgen-template-arrow { transform: translateX(4px); color: var(--pdfgen-primary); }

/* ── Form Container ────────────────────────────────────────────────────────── */
.pdfgen-form-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.pdfgen-form-header {
    margin-bottom: 1.5rem;
}

.pdfgen-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--pdfgen-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem 0;
    margin-bottom: 1rem;
    font-family: inherit;
    transition: color .2s;
}

.pdfgen-back-btn:hover { color: var(--pdfgen-primary); }

.pdfgen-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pdfgen-text);
    margin-bottom: 0.4rem;
}

.pdfgen-form-desc {
    color: var(--pdfgen-muted);
    font-size: 0.9rem;
}

/* ── Alert ─────────────────────────────────────────────────────────────────── */
.pdfgen-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--pdfgen-radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 500;
}

.pdfgen-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.pdfgen-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* ── Form Grid ─────────────────────────────────────────────────────────────── */
.pdfgen-form {
    background: var(--pdfgen-card-bg);
    border-radius: var(--pdfgen-radius);
    padding: 2rem;
    box-shadow: var(--pdfgen-shadow);
    border: 1px solid var(--pdfgen-border);
}

.pdfgen-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.pdfgen-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pdfgen-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pdfgen-text);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pdfgen-required { color: var(--pdfgen-error); }

.pdfgen-input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--pdfgen-border);
    border-radius: var(--pdfgen-radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--pdfgen-text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    box-sizing: border-box;
}

.pdfgen-input:focus {
    border-color: var(--pdfgen-primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

.pdfgen-input.pdfgen-input-error { border-color: var(--pdfgen-error); }

.pdfgen-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ── CAPTCHA ───────────────────────────────────────────────────────────────── */
.pdfgen-captcha-section {
    margin-bottom: 1.5rem;
}

.pdfgen-captcha-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: linear-gradient(135deg, #ede9fe, #dbeafe);
    border: 1.5px solid #c7d2fe;
    border-radius: var(--pdfgen-radius-sm);
}

.pdfgen-captcha-icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 0.15rem; }

.pdfgen-captcha-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pdfgen-captcha-input {
    max-width: 140px;
}

/* ── Submit Button ─────────────────────────────────────────────────────────── */
.pdfgen-submit-row {
    display: flex;
    justify-content: flex-end;
}

.pdfgen-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 2rem;
    background: linear-gradient(135deg, var(--pdfgen-primary), var(--pdfgen-primary-dark));
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--pdfgen-radius-sm);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, opacity .2s;
    box-shadow: 0 4px 14px rgba(79,70,229,.35);
    position: relative;
}

.pdfgen-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79,70,229,.45);
}

.pdfgen-submit-btn:active { transform: translateY(0); }

.pdfgen-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ── Spinner ───────────────────────────────────────────────────────────────── */
.pdfgen-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pdfgen-spin .7s linear infinite;
}

@keyframes pdfgen-spin {
    to { transform: rotate(360deg); }
}

/* ── Loading ───────────────────────────────────────────────────────────────── */
.pdfgen-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--pdfgen-muted);
    font-size: 0.9rem;
    gap: 0.75rem;
}

.pdfgen-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--pdfgen-border);
    border-top-color: var(--pdfgen-primary);
    border-radius: 50%;
    animation: pdfgen-spin .7s linear infinite;
}

/* ── Error message ─────────────────────────────────────────────────────────── */
.pdfgen-error {
    color: var(--pdfgen-error);
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border-radius: var(--pdfgen-radius-sm);
    border-left: 4px solid var(--pdfgen-error);
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .pdfgen-selector-card,
    .pdfgen-form {
        padding: 1.5rem 1rem;
    }

    .pdfgen-fields-grid {
        grid-template-columns: 1fr;
    }

    .pdfgen-template-grid {
        grid-template-columns: 1fr;
    }

    .pdfgen-submit-row {
        justify-content: stretch;
    }

    .pdfgen-submit-btn {
        width: 100%;
        justify-content: center;
    }

    .pdfgen-title { font-size: 1.25rem; }
    .pdfgen-form-title { font-size: 1.2rem; }
}

/* =============================================================================
   Google Scholar Layout Styles (Classic, Cards/Grid, Table)
   ============================================================================= */
.aiok-scholar-container {
    margin: 2rem 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Classic List Layout ── */
.aiok-scholar-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.aiok-scholar-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.aiok-scholar-item:last-child {
    border-bottom: none;
}
.aiok-scholar-title {
    margin: 0 0 0.5rem 0 !important;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}
.aiok-scholar-title a {
    color: #700412;
    text-decoration: none;
    transition: color 0.15s ease;
}
.aiok-scholar-title a:hover {
    color: #91261E;
    text-decoration: underline;
}
.aiok-scholar-authors {
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 0.25rem;
}
.aiok-scholar-meta {
    font-size: 0.8125rem;
    color: #64748b;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.aiok-scholar-venue {
    font-style: italic;
}
.aiok-scholar-divider {
    color: #cbd5e1;
}
.aiok-scholar-citations {
    color: #700412;
    text-decoration: none;
    font-weight: 600;
}
.aiok-scholar-citations:hover {
    text-decoration: underline;
}

/* ── Modern Cards/Grid Layout ── */
.aiok-scholar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.aiok-scholar-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.aiok-scholar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}
.aiok-scholar-card-body {
    margin-bottom: 1rem;
}
.aiok-scholar-card .aiok-scholar-title {
    font-size: 1rem;
    margin-bottom: 0.5rem !important;
}
.aiok-scholar-card .aiok-scholar-authors {
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}
.aiok-scholar-card .aiok-scholar-venue {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
    display: block;
}
.aiok-scholar-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}
.aiok-scholar-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}
.aiok-scholar-badge-year {
    background-color: #f1f5f9;
    color: #475569;
}
.aiok-scholar-badge-citations {
    background-color: #e0f2fe;
    color: #0369a1;
    text-decoration: none;
}
.aiok-scholar-badge-citations:hover {
    background-color: #bae6fd;
}

/* ── Compact Table Layout ── */
.aiok-scholar-table-responsive {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.aiok-scholar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}
.aiok-scholar-table th,
.aiok-scholar-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.aiok-scholar-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #475569;
}
.aiok-scholar-table tbody tr:hover {
    background-color: #f8fafc;
}
.aiok-scholar-table tbody tr:last-child td {
    border-bottom: none;
}
.aiok-scholar-td-title a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}
.aiok-scholar-td-title a:hover {
    text-decoration: underline;
}

/* =============================================================================
   Academic Calendar Styles (Annual Semester Grouping)
   ============================================================================= */
.aiok-annual-calendar-container {
    max-width: 1000px;
    margin: 2rem auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
}
.aiok-annual-cal-title {
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2.5rem !important;
    color: #0f172a;
}
/* ── Calendar Monthly Grid Layout (Tailwind UI Inspired) ── */
.aiok-calendar-container {
    max-width: 1000px;
    margin: 2rem auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.aiok-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.aiok-calendar-header h2 {
    margin: 0 !important;
    color: #111827 !important;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.75rem;
}
.aiok-calendar-header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.aiok-calendar-view-selector {
    display: inline-flex;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    overflow: hidden;
}
.aiok-view-btn {
    background: #ffffff;
    border: none;
    border-right: 1px solid #d1d5db;
    color: #475569;
    padding: 0.45rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    outline: none;
}
.aiok-view-btn:last-child {
    border-right: none;
}
.aiok-view-btn:hover {
    background: #f8fafc;
    color: #0f172a;
}
.aiok-view-btn.aiok-active {
    background: #4f46e5;
    color: #ffffff;
    font-weight: 600;
}
.aiok-view-btn.aiok-active:hover {
    background: #4338ca;
    color: #ffffff;
}

.aiok-calendar-header .aiok-calendar-btn-group {
    display: inline-flex;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    overflow: hidden;
}

.aiok-calendar-btn {
    background: #ffffff;
    border: none;
    color: #374151;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.aiok-calendar-btn:hover {
    background: #f9fafb;
    color: #111827;
}

.aiok-calendar-btn:first-child {
    border-right: 1px solid #d1d5db;
}

.aiok-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #e5e7eb; /* Perfect 1px grid line */
    gap: 1px;
}

/* ── Calendar Multi-Month Layouts ── */
.aiok-calendar-multi-grid {
    display: grid;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}
.aiok-calendar-multi-grid.aiok-grid-2col {
    grid-template-columns: repeat(2, 1fr);
}
.aiok-calendar-multi-grid.aiok-grid-3col {
    grid-template-columns: repeat(3, 1fr);
}
.aiok-mini-month-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}
.aiok-mini-month-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.875rem 0 !important;
    text-align: center;
}
.aiok-mini-day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: #475569;
    font-size: 0.65rem;
    margin-bottom: 0.35rem;
}
.aiok-mini-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.aiok-mini-day-cell {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.775rem;
    color: #334155;
    background: #f8fafc;
    cursor: default;
    transition: background-color 0.1s;
    padding-bottom: 2px;
}
.aiok-mini-day-cell:hover {
    background: #f1f5f9;
}
.aiok-mini-day-cell.aiok-prev-next {
    color: #cbd5e1;
    background: transparent;
}
.aiok-mini-day-cell.aiok-today {
    background: #4f46e5;
    color: #ffffff;
    font-weight: 600;
}
.aiok-mini-day-cell.aiok-has-event {
    font-weight: 600;
    color: #0f172a;
}
.aiok-mini-event-dots-wrap {
    display: flex;
    gap: 2px;
    justify-content: center;
    position: absolute;
    bottom: 3px;
    width: 100%;
}
.aiok-mini-event-dot {
    width: 3px;
    height: 3px;
    border-radius: 9999px;
}
@media (max-width: 1024px) {
    .aiok-calendar-multi-grid.aiok-grid-3col {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .aiok-calendar-multi-grid.aiok-grid-2col,
    .aiok-calendar-multi-grid.aiok-grid-3col {
        grid-template-columns: 1fr;
    }
}

.aiok-calendar-day-name {
    text-align: center;
    font-weight: 600;
    color: #374151;
    font-size: 0.825rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 0;
    background: #f9fafb;
}

.aiok-calendar-day-cell {
    position: relative;
    height: 110px;
    background: #ffffff;
    padding: 0.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background-color 0.15s;
}

.aiok-calendar-day-cell:hover {
    background-color: #f9fafb;
}

.aiok-calendar-day-cell.aiok-prev-next-month {
    background-color: #f9fafb;
}

.aiok-calendar-day-cell.aiok-prev-next-month .aiok-day-number {
    color: #9ca3af;
}

.aiok-day-number {
    font-weight: 600;
    font-size: 0.875rem;
    color: #111827;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

.aiok-calendar-day-cell.aiok-today .aiok-day-number {
    background-color: #4f46e5;
    color: #ffffff !important;
    border-radius: 9999px;
}

.aiok-day-events-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    flex: 1;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.aiok-day-event-dot {
    font-size: 0.725rem;
    padding: 4px 8px;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    transition: opacity 0.15s;
    color: #ffffff;
}

.aiok-day-event-dot:hover {
    opacity: 0.85;
}

/* Event List for Selected Month */
.aiok-selected-month-events {
    padding: 1.5rem 2rem;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.aiok-selected-month-events h3 {
    margin-top: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.aiok-month-events-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.aiok-month-event-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.875rem 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.aiok-month-event-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.aiok-event-card-color-stripe {
    width: 4px;
    height: 36px;
    border-radius: 2px;
    flex-shrink: 0;
}

.aiok-event-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.aiok-event-card-date {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
    display: block;
}

.aiok-event-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0 !important;
}

.aiok-event-card-desc {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0.25rem 0 0 0;
}

.aiok-month-no-events {
    text-align: center;
    color: #9ca3af;
    padding: 2rem 1rem;
    font-size: 0.875rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
}

/* =============================================================================
   Arsip Dokumen / Document Management Styles
   ============================================================================= */
.aiok-docs-container {
    max-width: 1000px;
    margin: 2rem auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

/* ── Filters & Search ── */
.aiok-docs-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    background: #ffffff;
    padding: 1.25rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.03);
}
.aiok-doc-search-wrap {
    position: relative;
    flex: 1;
    min-width: 280px;
    display: flex;
    align-items: stretch;
}
.aiok-doc-search-wrap input {
    width: 80% !important;
    padding: 0.6rem 1rem 0.6rem 2.25rem;
    border: 1px solid #cbd5e1;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 0.875rem;
    outline: none;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.75rem center;
    background-size: 1.1rem 1.1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #1e293b;
}
.aiok-doc-search-wrap input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.aiok-btn-search {
    width: 20% !important;
    min-width: 70px;
    padding: 0;
    border-radius: 0 8px 8px 0;
    font-size: 0.875rem;
    font-weight: 600;
    background: #4f46e5;
    border: 1px solid #4f46e5;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
}
.aiok-btn-search:hover {
    background: #4338ca;
    border-color: #4338ca;
}
.aiok-btn-search:focus {
    box-shadow: 0 0 0 3px rgba(79,70,229,0.2);
}
.aiok-doc-select-wrap select {
    padding: 0.6rem 2.25rem 0.6rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem 1rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-size: 0.875rem;
    cursor: pointer;
    min-width: 180px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #1e293b;
}
.aiok-doc-select-wrap select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.aiok-btn-reset {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    cursor: pointer;
}
.aiok-btn-reset:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* ── Table Layout ── */
.aiok-docs-table-responsive {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.aiok-docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}
.aiok-docs-table th,
.aiok-docs-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}
.aiok-docs-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.aiok-docs-table tbody tr:hover {
    background-color: #f8fafc;
}
.aiok-docs-table tbody tr:last-child td {
    border-bottom: none;
}
.aiok-doc-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}
.aiok-doc-desc {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
    line-height: 1.4;
}
.aiok-doc-cat-badge {
    display: inline-flex;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
    background: #f1f5f9;
    border-radius: 4px;
}
.aiok-doc-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    background-color: #4f46e5;
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.aiok-doc-download-btn:hover {
    background-color: #4338ca;
    color: #ffffff;
}
.aiok-doc-download-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}
.aiok-doc-locked-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    background-color: #fffbeb;
    border: 1px solid #fef3c7;
    color: #d97706;
    cursor: help;
}
.aiok-doc-locked-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}
.aiok-doc-no-file {
    color: #cbd5e1;
    font-weight: bold;
}
.aiok-doc-empty-cell {
    text-align: center;
    color: #64748b;
    padding: 3rem 1rem;
    font-style: italic;
}

/* ── Holiday/Sunday Date Color ── */
.aiok-holiday-date {
    color: #ef4444 !important;
}

/* ── 2-Column Agenda List Layout ── */
.aiok-agenda-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.aiok-agenda-col-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}
@media (max-width: 768px) {
    .aiok-agenda-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ── Multi-Day Spanning Event Blocks ── */
.aiok-day-event-dot.aiok-event-span {
    border-radius: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    border-left: none !important;
}
.aiok-day-event-dot.aiok-event-span-start {
    border-radius: 4px 0 0 4px !important;
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
    padding-left: 0.25rem !important;
}
.aiok-day-event-dot.aiok-event-span-end {
    border-radius: 0 4px 4px 0 !important;
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
    padding-right: 0.25rem !important;
    border-left: none !important;
}
.aiok-day-event-dot.aiok-event-span-single {
    border-radius: 4px !important;
    margin-left: 0.5rem !important;
    margin-right: 0.5rem !important;
}

/* ── Sync & Export Kalender Styles ── */
.aiok-calendar-sync-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4f46e5;
    background: #f5f3ff;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: background-color 0.15s, border-color 0.15s;
    height: 32px;
}
.aiok-calendar-sync-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}
.aiok-calendar-sync-btn:hover,
.aiok-calendar-sync-btn.aiok-active {
    background: #e0e7ff;
    border-color: #818cf8;
}
.aiok-calendar-sync-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.aiok-sync-panel-content h4 {
    margin: 0 0 0.5rem 0 !important;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}
.aiok-sync-panel-content p {
    margin: 0 0 1.25rem 0 !important;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.5;
}
.aiok-sync-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}
@media (max-width: 640px) {
    .aiok-sync-options {
        grid-template-columns: 1fr;
    }
}
.aiok-sync-option-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
}
.aiok-sync-option-card h5 {
    margin: 0 0 0.5rem 0 !important;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
}
.aiok-sync-option-card p {
    margin: 0 0 1rem 0 !important;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}
.aiok-sync-url-wrap {
    display: flex;
    gap: 0.5rem;
}
.aiok-sync-url-wrap input {
    flex: 1;
    padding: 0.375rem 0.625rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.75rem;
    background: #ffffff;
    color: #334155;
    outline: none;
}
.aiok-btn-copy {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #4f46e5;
    border: 1px solid #4f46e5;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.15s;
    white-space: nowrap;
}
.aiok-btn-copy:hover {
    background: #4338ca;
}
.aiok-btn-copy.aiok-copied {
    background: #10b981;
    border-color: #10b981;
}
.aiok-btn-download-ics {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    text-decoration: none !important;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    cursor: pointer;
}
.aiok-btn-download-ics:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}
.aiok-btn-download-ics .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

/* ── "Add to Calendar" per Agenda Card ── */
.aiok-month-event-card {
    position: relative;
    overflow: hidden;
}
.aiok-event-card-actions {
    display: flex;
    gap: 0.375rem;
    margin-left: auto;
    flex-shrink: 0;
    align-self: center;
}
.aiok-card-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color 0.15s, border-color 0.15s;
    line-height: 1;
}
.aiok-card-action-btn.gcal {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
}
.aiok-card-action-btn.gcal:hover {
    background: #e5e7eb;
}
.aiok-card-action-btn.ics {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}
.aiok-card-action-btn.ics:hover {
    background: #dbeafe;
}
.aiok-card-action-btn .dashicons {
    font-size: 11px;
    width: 11px;
    height: 11px;
    line-height: 11px;
}

/* ── Seluruh Daftar Agenda Akademik (Full-width Card) ── */
.aiok-all-events-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}
.aiok-all-events-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
@media (max-width: 768px) {
    .aiok-all-events-grid {
        grid-template-columns: 1fr;
    }
}
