/* Core Styles */
body {
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
    background-color: #f5f5f5;
}

.f16 { font-size: 1.25rem; font-weight: bold; }
.f14 { font-size: 1.1rem; line-height: 1.4; }
.f12 { font-size: 0.9rem; }
.f11 { font-size: 0.8rem; }
.f10 { font-size: 0.75rem; }

/* Links */
a {
    color: #336600;
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: #4040ff;
    text-decoration: underline;
    background-color: #ffffdd;
}

/* Base Table Overrides */
.main-table {
    width: 100% !important;
    max-width: 800px;
    margin: 0 auto;
    border: none !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    background-color: #fff;
}

/* Hamburger Menu Base */
.hamburger {
    display: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .main-table, .main-table table {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    table, tbody, tr, td {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    td[background] {
        background-image: none !important;
    }
    
    /* Content styling for mobile */
    td[bgcolor="#FFFFFF"] {
        padding: 20px !important;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Improved Hamburger Button Styling */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 60px;
        height: 60px;
        background: #2c3e50; /* Deep Charcoal for professional contrast */
        border: none;
        cursor: pointer;
        z-index: 1001;
        position: fixed;
        bottom: 20px; /* Moved to bottom-right for thumb reachability - more modern */
        right: 20px;
        border-radius: 50%; /* Circle looks more premium */
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        padding: 0;
        transition: transform 0.2s ease;
    }
    
    .hamburger:active {
        transform: scale(0.9);
    }
    
    .hamburger span {
        width: 24px;
        height: 2px;
        background: white;
        border-radius: 2px;
        margin: 2px 0;
        transition: all 0.3s ease;
    }

    .hamburger::after {
        content: "MENU";
        color: white;
        font-size: 10px;
        font-weight: bold;
        margin-top: 2px;
        letter-spacing: 1px;
    }

    body.menu-open .hamburger {
        background: #e74c3c; /* Change to Red when open for clear "Close" action */
    }
    
    body.menu-open .hamburger span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
    body.menu-open .hamburger span:nth-child(2) { opacity: 0; }
    body.menu-open .hamburger span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }
    body.menu-open .hamburger::after {
        content: "CLOSE";
    }

    /* Sidebar as Mobile Drawer */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        right: -300px !important;
        width: 280px !important;
        height: 100% !important;
        background: #fff !important;
        z-index: 1003 !important; /* Above everything */
        transition: right 0.3s ease-in-out !important;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2) !important;
        overflow-y: auto !important;
        padding-top: 20px !important;
        display: block !important;
    }
    
    body.menu-open .sidebar {
        right: 0 !important;
    }
    
    /* Overlay */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1002;
    }
    body.menu-open .menu-overlay {
        display: block;
    }

    /* Navigation items in drawer */
    .sidebar table {
        width: 100% !important;
    }
    .sidebar td {
        display: block !important;
    }
    .sidebar a {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        font-size: 16px;
        font-weight: 500;
        background: #fff !important;
        color: #333 !important;
    }
    .sidebar a:hover {
        background: #f0fdf0 !important;
        color: #27ae60 !important;
    }
}

/* Modern Touches */
body {
    background-attachment: fixed;
    background-position: 100% 95%;
    background-repeat: no-repeat;
}