/* 全体の基本スタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    color: #1c1e21;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* ナビゲーションバー */
.navbar {
    background-color: #1877F2;
    padding: 0 20px;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 10px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-username {
    padding: 8px 10px;
    font-weight: bold;
    color: white;
    font-size: 0.9rem;
}

/* ドロップダウン */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 8px 0;
    list-style: none;
    min-width: 200px;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    color: #333;
    padding: 10px 20px;
    display: block;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background-color: #f0f2f5;
}

.dropdown-icon {
    font-size: 0.7em;
    vertical-align: middle;
}

/* --- レスポンシブ対応追加 --- */
@media (max-width: 900px) {
    .content-wrapper {
        max-width: 98vw;
        padding: 0 8px;
    }
    .card {
        max-width: 98vw;
        padding: 18px 6px;
    }
    .navbar, .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-links {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .content-wrapper {
        padding: 0 2vw;
    }
    .card {
        padding: 10px 2vw;
        font-size: 0.95em;
    }
    .navbar {
        padding: 8px 4vw;
        font-size: 0.95em;
    }
    .nav-links {
        flex-direction: column;
        gap: 6px;
    }
    .button-row {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .table-responsive {
        font-size: 0.92em;
    }
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.creative-card .creative-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 !important;
    margin: 0 !important;
    display: block;
}
.creative-card .creative-info h3 {
    font-size: 1em;
    text-align: center;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    margin-left: auto;
    margin-right: auto;
}

.metaid-row .metaid-copy-btn {
  margin-left: 12px !important;
}

/* ボタンの背景色をリセットし、青枠・青文字・白背景に統一 */
.btn, .btn-outline-info, .btn-primary {
    background: #fff !important;
    background-color: #fff !important;
    color: #1877F2 !important;
    border: 1.5px solid #1877F2 !important;
    box-shadow: none !important;
}
.btn-outline-info:hover, .btn-primary:hover {
    background: #1877F2 !important;
    color: #fff !important;
    border: 1.5px solid #1877F2 !important;
}
/* テーブルセルの背景色を白に */
td, th {
    background: #fff !important;
}

/* 詳細ボタンを常に青背景・白文字に */
.btn-outline-info {
    background: #1877F2 !important;
    background-color: #1877F2 !important;
    color: #fff !important;
    border: 1.5px solid #1877F2 !important;
    box-shadow: none !important;
}
.btn-outline-info:hover {
    background: #145dc2 !important;
    background-color: #145dc2 !important;
    color: #fff !important;
    border: 1.5px solid #145dc2 !important;
}

.btn-danger {
    color: #fff !important;
    background: #dc3545 !important;
    background-color: #dc3545 !important;
    border: 1.5px solid #dc3545 !important;
}
.btn-danger:hover {
    background: #a71d2a !important;
    background-color: #a71d2a !important;
    border: 1.5px solid #a71d2a !important;
}

.btn-edit {
    color: #fff !important;
    background: #28a745 !important;
    background-color: #28a745 !important;
    border: 1.5px solid #28a745 !important;
}
.btn-edit:hover {
    background: #1e7e34 !important;
    background-color: #1e7e34 !important;
    border: 1.5px solid #1e7e34 !important;
}

.creative-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.creative-actions .btn,
.creative-actions .btn-preview {
    margin-bottom: 4px;
    padding: 6px 16px;
    font-size: 1em;
    border-radius: 6px;
}
.btn-preview {
    color: #1877F2;
    background: #fff;
    border: 1.5px solid #1877F2;
}
.btn-preview:hover {
    background: #e6f0ff;
}
.btn i {
    margin-right: 4px;
}
