/* ====================================
   読み取りKUN - スタイルシート
   ==================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN', Meiryo, メイリオ, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* ====================================
   ロゴ共通スタイル
   ==================================== */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
}

.logo-center {
    justify-content: center;
}

.logo-icon {
    position: relative;
    width: 45px;
    height: 45px;
}

.logo-icon .wifi-icon {
    position: absolute;
    top: -5px;
    left: 12px;
}

.logo-icon .doc-icon {
    position: absolute;
    bottom: 0;
    left: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-sub {
    font-size: 0.65rem;
    color: #666;
    margin-bottom: 2px;
}

.logo-main {
    display: flex;
    align-items: center;
}

.logo-yomitori {
    background: #F5C518;
    color: #333;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 2px 8px;
}

.logo-kun {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-left: 4px;
}

/* ====================================
   ログインページ
   ==================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    position: relative;
    overflow: hidden;
}

.decoration.green-circle {
    position: absolute;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle at center, rgba(200, 240, 210, 0.8) 0%, rgba(180, 230, 200, 0.4) 40%, transparent 70%);
    border-radius: 50%;
    top: -180px;
    left: -180px;
    z-index: 0;
}

.decoration.orange-shape {
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle at center, rgba(255, 220, 180, 0.8) 0%, rgba(255, 200, 150, 0.4) 40%, transparent 70%);
    border-radius: 50%;
    bottom: -100px;
    right: -100px;
    z-index: 0;
}

.login-container {
    z-index: 1;
    width: 100%;
    max-width: 700px;
    padding: 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 15px;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.login-logo .logo-icon {
    width: 55px;
    height: 55px;
}

.login-logo .logo-yomitori {
    font-size: 1.8rem;
    padding: 3px 12px;
}

.login-logo .logo-kun {
    font-size: 1.8rem;
}

.login-logo .logo-sub {
    font-size: 0.75rem;
}

.login-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

.login-card {
    background: #fff;
    border-radius: 40px;
    padding: 60px 70px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

.login-form .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}

.login-form .form-row label {
    width: 100px;
    font-size: 0.95rem;
    color: #333;
    flex-shrink: 0;
}

.login-form .form-row input {
    flex: 1;
    padding: 14px 22px;
    border: 1px solid #ccc;
    border-radius: 50px;
    font-size: 1rem;
    background: #fff;
}

.login-form .form-row input:focus {
    outline: none;
    border-color: #00bcd4;
}

.login-actions {
    text-align: center;
    margin-top: 35px;
}

.btn-login {
    padding: 14px 90px;
    background: linear-gradient(to bottom, #4dd0e1, #00bcd4);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.35);
}

.btn-login:hover {
    background: linear-gradient(to bottom, #26c6da, #00acc1);
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
    color: #333;
}

.login-footer a {
    color: #00bcd4;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

/* ====================================
   ダッシュボード レイアウト
   ==================================== */
.dashboard {
    min-height: 100vh;
    display: flex;
}

/* サイドバー */
.sidebar {
    width: 200px;
    background: #9e9e9e;
    min-height: 100vh;
    flex-shrink: 0;
    position: fixed;
    left: -200px;
    top: 0;
    z-index: 1000;
    transition: left 0.3s ease;
}

.sidebar.open {
    left: 0;
}

.sidebar-nav {
    padding: 0;
    margin-top: 65px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav a.active {
    background: #f0f0f0;
    color: #333;
    border-left: 4px solid #f5c518;
}

.sidebar-nav .nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* オーバーレイ */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
}

.sidebar.open ~ .sidebar-overlay {
    display: block;
}

/* メインエリア */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ヘッダー */
.header {
    background: #fff;
    padding: 0 25px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 4px solid #f5c518;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ハンバーガーメニュー */
.hamburger {
    background: none;
    border: none;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    position: absolute;
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 10px;
}

.hamburger span:nth-child(3) {
    top: 20px;
}

.hamburger.active span:nth-child(1) {
    top: 10px;
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-45deg);
}

.header-logo .logo-icon {
    width: 40px;
    height: 40px;
}

.header-logo .logo-yomitori {
    font-size: 1.2rem;
}

.header-logo .logo-kun {
    font-size: 1.2rem;
}

.header-logo .logo-sub {
    font-size: 0.6rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.company-name {
    font-size: 0.95rem;
    color: #00bcd4;
    font-weight: bold;
}

.content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: #e8e8e8;
}

/* ====================================
   TOPページ
   ==================================== */
.section-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.feature-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px 25px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.feature-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.feature-card.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.feature-card p {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.5;
}

.policy-section {
    margin-top: 30px;
}

.policy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.policy-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px 25px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.policy-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    text-decoration: underline;
}

.policy-card p {
    font-size: 0.85rem;
    color: #666;
}

/* ====================================
   アップロードページ
   ==================================== */
.section-header {
    background: #fff;
    border-left: 5px solid #f5c518;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0;
}

.section-content {
    background: #fff;
    padding: 25px 30px;
    margin-bottom: 20px;
}

.section-content > p {
    margin-bottom: 25px;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.7;
}

.upload-area {
    border: 2px dashed #bbb;
    border-radius: 12px;
    padding: 45px 40px;
    text-align: center;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #3f51b5;
    background: #fafbff;
}

.upload-icon {
    margin-bottom: 20px;
}

.upload-area h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
}

.upload-area .sub {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.upload-area .supported {
    color: #888;
    font-size: 0.82rem;
    margin-top: 18px;
    margin-bottom: 0;
}

/* ボタン */
.btn-secondary {
    padding: 12px 35px;
    background: linear-gradient(to bottom, #ffb74d, #ff9800);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(to bottom, #ffa726, #fb8c00);
}

.btn-primary {
    padding: 14px 50px;
    background: linear-gradient(to bottom, #4dd0e1, #00bcd4);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #26c6da, #00acc1);
}

.btn-back {
    padding: 12px 40px;
    background: linear-gradient(to bottom, #ffb74d, #ff9800);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.3);
}

.btn-back:hover {
    background: linear-gradient(to bottom, #ffa726, #fb8c00);
}

.file-list {
    margin-top: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
}

.file-list h5 {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.file-list ul {
    list-style: none;
}

.file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.file-list li button {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
}

.file-list li button:hover {
    color: #f44336;
}

/* ====================================
   処理中モーダル
   ==================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 20px;
    padding: 40px 60px;
    text-align: center;
    min-width: 300px;
}

.modal h3 {
    color: #9c27b0;
    font-size: 1.3rem;
    margin-bottom: 30px;
}

.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 25px;
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.progress-circle .bg {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 8;
}

.progress-circle .progress {
    fill: none;
    stroke: #00bcd4;
    stroke-width: 8;
    stroke-linecap: round;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-text .num {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

.progress-text .label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 3px;
}

/* ====================================
   確認ページ
   ==================================== */
.progress-header {
    background: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.progress-info strong {
    color: #333;
}

.progress-info span {
    color: #00bcd4;
    font-weight: bold;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, #4dd0e1, #00bcd4);
    border-radius: 15px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.progress-bar span {
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.review-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
}

.review-panel h3 {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 18px;
    text-align: center;
}

.review-panel .panel-content {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    min-height: 400px;
    background: #fafafa;
}

.review-panel .preview-frame {
    width: 100%;
    height: 380px;
    border: none;
}

.review-panel .preview-image {
    max-width: 100%;
    height: auto;
}

.review-form .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.review-form .form-row label {
    width: 110px;
    font-size: 0.9rem;
    color: #333;
    flex-shrink: 0;
    white-space: nowrap;
}

.review-form .form-row input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
}

.review-form .form-row input:focus {
    outline: none;
    border-color: #00bcd4;
}

.review-form .form-row select,
.review-form .form-row .form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
    background: #fff;
    cursor: pointer;
}

.review-form .form-row select:focus,
.review-form .form-row .form-select:focus {
    outline: none;
    border-color: #00bcd4;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border: 1px solid #ddd;
}

.data-table th {
    background: #f5f5f5;
    padding: 10px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: normal;
    border: 1px solid #ddd;
}

.data-table td {
    padding: 5px;
    border: 1px solid #ddd;
}

.data-table input {
    width: 100%;
    padding: 8px;
    border: none;
    font-size: 0.9rem;
    text-align: center;
}

.data-table input:focus {
    outline: 2px solid #00bcd4;
}

.review-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding-top: 20px;
    gap: 20px;
}

.review-actions .nav-left,
.review-actions .nav-right {
    flex: 0 0 auto;
}

.file-name-badge {
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #666;
    border: 1px solid #e0e0e0;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-indicator {
    flex-shrink: 0;
}

.review-actions .nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.page-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.page-dot:hover {
    background: #e0e0e0;
    color: #333;
}

.page-dot.active {
    background: linear-gradient(to bottom, #4dd0e1, #00bcd4);
    color: white;
    font-weight: bold;
    border-color: #00bcd4;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.3);
}

.page-ellipsis {
    color: #999;
    padding: 0 4px;
}

.btn-success {
    padding: 14px 40px;
    background: linear-gradient(to bottom, #66bb6a, #4caf50);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    transition: all 0.3s;
}

.btn-success:hover {
    background: linear-gradient(to bottom, #5cb85f, #43a047);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

.btn-back {
    padding: 12px 30px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-back:hover {
    background: #e8e8e8;
    border-color: #ccc;
    transform: translateY(-2px);
}

/* ====================================
   ダウンロードページ
   ==================================== */
.download-container {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 12px;
}

.download-container h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.download-container p {
    color: #666;
    margin-bottom: 40px;
}

.download-icon {
    margin-bottom: 40px;
}

.download-icon svg {
    width: 80px;
    height: 80px;
}

/* ====================================
   完了ページ
   ==================================== */
.complete-container {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
}

.complete-container h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.complete-container p {
    color: #666;
    margin-bottom: 30px;
}

.complete-illustration {
    margin-bottom: 40px;
}

.complete-illustration img {
    max-width: 350px;
    height: auto;
}

/* ====================================
   レスポンシブ
   ==================================== */
@media (max-width: 900px) {
    .review-container {
        grid-template-columns: 1fr;
    }
    
    .card-grid,
    .policy-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 20px 15px;
    }
    
    .login-card {
        padding: 40px 30px;
        border-radius: 30px;
    }
    
    .login-form .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .login-form .form-row label {
        width: auto;
        margin-bottom: 8px;
    }
    
    .login-logo .logo-yomitori {
        font-size: 1.4rem;
    }
    
    .login-logo .logo-kun {
        font-size: 1.4rem;
    }
}


/* サイドバー：区切り・ログアウト */
.sidebar-sep{
    border-top: 1px solid rgba(255,255,255,0.25);
    margin: 8px 0;
}
.sidebar-nav a.logout-link:hover{
    background: rgba(255, 255, 255, 0.1);
}


/* preview rotate controls */
.btn-mini{
  padding: 6px 10px;
  font-size: 0.9rem;
  line-height: 1;
  border-radius: 10px;
}
.preview-rotatable{
  transition: transform 120ms ease;
  will-change: transform;
}
