/* 共通スタイル */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

.container {
    margin: 100px auto;
max-width: 1500px   ;
    padding: 0 15px;
}
.container table th {
    text-align: center;
}
/* ログインフォーム */
.login-form {
    max-width: 1200px;
    margin: 30px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-form h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 24px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.login-form .entryType dl {
    margin: 0;
}

.login-form .entryType dt {
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.login-form .entryType dd {
    margin-bottom: 20px;
    margin-left: 0;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.login-form .input-wrap {
    position: relative;
}

.login-form .toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
}

.login-form input[type="submit"] {
    padding: 12px 25px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.login-form input[type="submit"]:hover {
    background-color: #45a049;
}

/* アフィリエイトヘッダー部分 */
.affiliate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}



/* 結果表示領域 */
#results-container {
    max-width: 1300px;
    margin: 0 auto;
}

.results {
    padding: 5px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.results h2 {
    margin-top: 0;
    font-size: 22px;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

/* コントロール部分 */
.results-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.results-controls form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.results-controls select {
    padding: 10px 15px;
    margin-right: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
    min-width: 120px;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6"><path d="M0,0 L12,0 L6,6 Z" fill="%23333"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.results-controls select:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.results-controls input[type="submit"],
.button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.3s;
    text-decoration: none !important;
    display: inline-block;
    margin-right: 10px !important;
    margin-bottom: 10px !important;
}
.button2 {
    padding: 10px 20px !important;
    background-color: #4CAF50;
    color: white !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.3s;
    text-decoration: none !important;
    display: inline-block;
    margin-right: 10px !important;
    margin-bottom: 10px !important;
}
.results-controls input[type="submit"]:hover,
.button:hover {
    background-color: #45a049;
}

.button.button-secondary {
    background-color: #f8f8f8;
    color: #333;
    border: 1px solid #ddd;
}

.button.button-secondary:hover {
    background-color: #f0f0f0;
}

.button.button-primary {
    background-color: #4CAF50;
    color: white;
}

.button.button-primary:hover {
    background-color: #45a049;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    text-align: right;
    width: 100%;
}

/* テーブルスタイル */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 5px 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.results-table th,
.results-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    font-size: 12px;
}

.results-table th {
    font-weight: bold;
    background-color: #f5f5f5;
    color: #333;
    border-bottom: 2px solid #ddd;
}

/* 偶数行の背景色 */
.results-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* ホバー時の背景色 */
.results-table tr:hover {
    background-color: #f0f0f0;
}

/* 金額の右寄せ */
.results-table td.price,
.results-table td:nth-child(4) {
    text-align: right;
}

/* メールアドレス列の幅調整 */
.results-table td.email,
.results-table td:nth-child(9) {
    min-width: 200px;
    word-break: break-all;
}

/* 取り消し列のスタイル */
.results-table td.cancel,


/* ログアウトボタン */
.logout {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f44336;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.logout:hover {
    background-color: #d32f2f;
    text-decoration: none;
    color: white;
}

/* 集計テーブル */
.summary-table {
    width: auto;
    margin-top: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.summary-table td {
    padding: 12px 20px;
    font-weight: bold;
    background-color: #f9f9f9;
}

.summary-table tr:first-child td {
    border-top: 2px solid #ddd;
}

/* エラーメッセージ */
.error-message {
    color: #dc3232;
    margin: 15px 0;
    padding: 15px;
    border-left: 4px solid #dc3232;
    background-color: #f8d7da;
    border-radius: 0 4px 4px 0;
}

/* 年別表示と月毎の集計スタイル */
.view-selector {
    margin: 20px 0;
    text-align: right;
}

.yearly-summary-container,
.monthly-summary-container {
    max-width: 1200px;
    margin: 0 auto;
}

.year-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.yearly-totals,
.monthly-summary {
    margin-bottom: 30px;
}

.yearly-totals h3,
.monthly-summary h3 {
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    font-size: 20px;
    color: #333;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .results-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-controls form {
        margin-bottom: 15px;
        width: 100%;
    }
    
    .results-controls select {
        margin-bottom: 10px;
        width: 100%;
    }
    
    .results-table {
        display: block;
        overflow-x: auto;
    }
    
    .affiliate-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
   
}

/* 日付選択フォーム */
.date-selector {
    display: flex;
    flex-wrap: wrap;
}


/* テキスト配置ユーティリティ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

/* メッセージ表示 */
.message {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.message.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* アカウント編集フォーム */
.account-edit-form {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.account-edit-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    font-size: 20px;
    color: #333;
}

.form-table {
    width: 100%;
    border-collapse: collapse;
}

.form-table th {
    text-align: left;
    width: 200px;
    padding: 15px 10px;
}

.form-table td {
    padding: 15px 10px;
}

.form-table input[type="text"],
.form-table input[type="email"],
.form-table input[type="password"],
.form-table input[type="url"] {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-table .description {
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.submit {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.duplicate {
    text-decoration: line-through;
}

/* マージンユーティリティ */
.mb-0 {
    margin-bottom: 0;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-0 {
    margin-top: 0;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}