/**
 * IPPO J-TEST Application Styles
 */

/* =============================================
   Layout - Sidebar
   ============================================= */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: #1e293b;
    color: #fff;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #334155;
}

.sidebar-logo {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.sidebar-logo:hover {
    color: #fff;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section-title {
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #334155;
    color: #fff;
}

.nav-link.active {
    background: #0d6efd;
    color: #fff;
}

.nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* =============================================
   Layout - Main Content
   ============================================= */
.main-content {
    margin-left: 250px;
    min-height: 100vh;
    background: #f8fafc;
}

.main-header {
    background: #fff;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-user-name {
    font-weight: 500;
    color: #1e293b;
}

.header-user-role {
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
}

.page-content {
    padding: 24px;
}

.flash-messages {
    margin-bottom: 20px;
}

/* =============================================
   Cards
   ============================================= */
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* =============================================
   Form Styles
   ============================================= */
.required::after {
    content: " *";
    color: #dc3545;
}

/* =============================================
   Status Badges
   ============================================= */
.badge-status {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
}

.badge-invited {
    background-color: #6c757d;
    color: white;
}

.badge-survey-done {
    background-color: #17a2b8;
    color: white;
}

.badge-reserved {
    background-color: #ffc107;
    color: #212529;
}

.badge-evaluating {
    background-color: #fd7e14;
    color: white;
}

.badge-certified {
    background-color: #28a745;
    color: white;
}

/* =============================================
   Statistics
   ============================================= */
.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #0d6efd;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
}

/* =============================================
   Progress Steps (Candidate Mypage)
   ============================================= */
.progress-steps .step {
    padding: 20px;
}

.progress-steps .step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 24px;
}

.progress-steps .step.completed .step-icon {
    background-color: #d1fae5;
    color: #065f46;
}

.progress-steps .step-label {
    font-weight: 500;
    margin-bottom: 8px;
}

/* =============================================
   Survey Styles
   ============================================= */
.answer-option {
    cursor: pointer;
    transition: all 0.2s;
}

.answer-option:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd !important;
}

.answer-option:has(input:checked) {
    background-color: #e7f1ff;
    border-color: #0d6efd !important;
}

.answer-option .form-check-input {
    margin-top: 0.3em;
}

.answer-option .form-check-label {
    cursor: pointer;
}

#timer {
    min-width: 50px;
    text-align: center;
}

#timer.warning {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* =============================================
   FullCalendar Customization
   ============================================= */
.fc-event {
    cursor: pointer;
}

.fc .fc-timegrid-slot {
    height: 2em;
}

/* イベントを1行表示 */
.fc-timegrid-event .fc-event-main {
    display: flex;
    align-items: center;
    padding: 0 4px;
    height: 100%;
}

.fc-timegrid-event .fc-event-main-frame {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.fc-timegrid-event .fc-event-time,
.fc-timegrid-event .fc-event-title-container,
.fc-timegrid-event .fc-event-title {
    display: inline;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1;
}

.fc-daygrid-event .fc-event-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =============================================
   Login Layout Styles
   ============================================= */
.login-layout body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 16px;
    color: #64748b;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 8px;
}

.login-form .form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form .form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-form .form-control::placeholder {
    color: #64748b;
}

.login-form .btn-block {
    width: 100%;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.forgot-password-link,
.back-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password-link:hover,
.back-link:hover {
    text-decoration: underline;
}

/* Login Flash messages */
.login-card .message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.login-card .message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.login-card .message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.login-card .message.warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Login Input error state */
.login-form .form-control.is-invalid,
.login-form .form-control.error {
    border-color: #ef4444;
}

.login-form .error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

/* =============================================
   Pagination Styles
   ============================================= */
.pagination {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.pagination .page-item {
    list-style: none;
}

.pagination .page-link {
    border-radius: 0;
}

.pagination .page-item:first-child .page-link {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.pagination .page-item:last-child .page-link {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* =============================================
   Nav Tabs Styles
   ============================================= */
.nav-tabs .nav-link {
    color: #475569;
    font-weight: 500;
}

.nav-tabs .nav-link:hover:not(.active) {
    color: #0d6efd;
    background-color: #f8fafc;
    border-color: transparent transparent #dee2e6;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    font-weight: 600;
}
