/* 管理画面のスタイル */
/* Layout */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #2c3e50;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.sidebar-content {
    padding: 1rem;
}

.sidebar-brand {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 1.15rem 1.5rem;
    display: block;
    text-decoration: none;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.625rem 1.625rem;
    display: block;
    transition: all 0.3s;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-link i {
    margin-right: 0.75rem;
}

/* Main content */
.main {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    width: calc(100% - 260px);
}

/* Navbar */
.navbar {
    padding: 0.5rem 1rem;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 1rem;
}

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

.navbar-title {
    color: #343a40;
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
    font-size: 1.1rem;
}

/* User dropdown */
.navbar .dropdown {
    margin-left: auto;
}

.navbar .btn-link {
    color: #6c757d;
    text-decoration: none;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    background: none;
    border: none;
}

.navbar .btn-link:hover {
    color: #343a40;
}

.navbar .btn-link img.rounded-circle {
    width: 32px !important;
    height: 32px !important;
    margin-right: 0.5rem;
    border-radius: 50% !important;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.navbar .dropdown-toggle::after {
    margin-left: 0.5rem;
}

/* Dropdown menu */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    min-width: 200px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    color: #2c3e50;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item i {
    margin-right: 0.75rem;
    width: 1rem;
    text-align: center;
    font-size: 1.1rem;
    color: #6c757d;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #1a252f;
}

.dropdown-item:hover i {
    color: #2c3e50;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-top: 1px solid #e9ecef;
}

/* Content */
.content {
    flex: 1;
    padding: 2rem;
    width: 100%;
}

.container-fluid {
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
    margin-right: auto;
    margin-left: auto;
}

/* Sidebar toggle button */
.navbar .sidebar-toggle {
    display: none !important;
    padding: 0;
    color: #6c757d;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    margin-right: 1rem;
}

.navbar .sidebar-toggle:hover {
    color: #343a40;
}

/* Sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* Mobile styles */
@media (max-width: 768px) {
    .navbar .container-fluid {
        justify-content: space-between;
    }

    .navbar .sidebar-toggle {
        display: flex !important;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main {
        margin-left: 0;
        width: 100%;
    }

    .navbar .container-fluid {
        padding: 0.5rem;
    }

    .content {
        padding: 1rem;
    }

    .navbar .btn-link img.rounded-circle {
        width: 28px !important;
        height: 28px !important;
    }
}

/* Card styles */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.table th {
    background-color: #f8f9fa;
}

/* Dashboard cards */
.card .display-4 {
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1.2;
}

/* Form styles */
.form-label {
    font-weight: 500;
}

/* Button styles */
.btn {
    font-weight: 500;
}

/* Modal styles */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Log table */
.table-responsive {
    max-height: 70vh;
    overflow-y: auto;
}

/* Error details */
pre#errorDetails {
    max-height: 50vh;
    overflow-y: auto;
    font-size: 0.875rem;
}

/* System info */
dl.row dt {
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card .display-4 {
        font-size: 2rem;
    }
} 