/* Portal Styles */
:root {
    --primary-color: #4A90A4;
    --secondary-color: #6B7280;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --background-color: #FFFFFF;
    --card-background: #FFFFFF;
    --text-color: #1F2937;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --line-color: #00B900;
    --slack-color: #4A154B;
    --email-color: #2C3E50;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 16px;
}

/* Header Logo */
.header-logo {
    height: 2rem;
    width: auto;
    margin-right: 0.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-left a {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.header-left a:hover {
    opacity: 0.8;
}

.portal-header h1 a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.5rem;
}

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

.user-name {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.btn-logout {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.btn-logout:hover {
    text-decoration: underline;
}

/* Main Content */
.portal-main {
    flex: 1;
    padding-bottom: 80px;
}

/* Flash Messages */
.flash-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.875rem;
}

.flash-success {
    background-color: #D1FAE5;
    color: #065F46;
}

.flash-error {
    background-color: #FEE2E2;
    color: #991B1B;
}

.flash-warning {
    background-color: #FEF3C7;
    color: #92400E;
}

/* Navigation */
.portal-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--card-background);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    max-width: 480px;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 0.75rem;
}

/* Login Page */
.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-card {
    background-color: var(--card-background);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
}

.login-card h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.login-description {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 16px;
}

.login-note + .login-note {
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-line {
    background-color: var(--line-color);
    color: white;
}

.btn-slack {
    background-color: var(--slack-color);
    color: white;
}

.btn-email {
    background-color: var(--email-color);
    color: white;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background-color: var(--border-color);
    color: var(--text-color);
}

.btn-edit {
    background-color: transparent;
    color: var(--primary-color);
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn:hover {
    opacity: 0.9;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cards */
.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.quick-link-card {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.quick-link-card:hover {
    transform: translateY(-2px);
}

.quick-link-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.quick-link-card h3 {
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.quick-link-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Info Section */
.info-section {
    margin-top: 24px;
}

.info-section h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.info-card {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.info-value {
    font-size: 0.875rem;
}

/* Settings - test.htmlのスタイルを使用するため削除 */

.keyword-tag {
    display: inline-block;
    background-color: var(--background-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 4px;
    margin-bottom: 4px;
}

.status-on {
    color: var(--success-color);
    font-weight: 500;
}

.status-off {
    color: var(--text-muted);
}

/* Forms */
.settings-form {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 24px;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions .btn {
    flex: 1;
}

/* Articles */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-card {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 16px;
}

.article-title a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-summary {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 8px 0;
}

.article-meta {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.no-articles {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-muted);
}

.no-articles-hint {
    font-size: 0.875rem;
    margin-top: 8px;
}

/* Account Link */
.accounts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-card {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-icon {
    font-size: 1.5rem;
}

.account-info {
    flex: 1;
}

.account-provider {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

.account-name {
    font-size: 0.875rem;
}

.account-status.linked {
    font-size: 0.75rem;
    color: var(--success-color);
}

.link-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* Plan */
.plans-grid {
    display: grid;
    gap: 16px;
}

.plan-card {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

.plan-card.current {
    border: 2px solid var(--primary-color);
}

.plan-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 12px;
}

.plan-card h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.plan-features {
    list-style: none;
    margin-bottom: 16px;
}

.plan-features li {
    font-size: 0.875rem;
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.plan-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
}

.plan-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 24px;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    padding: 24px 0;
}

.welcome-section h2 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.welcome-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (min-width: 768px) {
    .container {
        max-width: 640px;
    }

    .portal-nav {
        max-width: 640px;
    }
}
